rawhat / glisten

A pure gleam TCP library
Apache License 2.0
55 stars 8 forks source link

Permit acceptor process to recieve other messages #11

Closed lpil closed 10 months ago

lpil commented 10 months ago

Currently the acceptor process can only accept messages from the socket. There is no way for any other parts of the application to send an Erlang message to the acceptor process.

This means that the process can only do request-response messaging. It is not possible to (for example) implement pubsub, or anything else where it is driven not by the client, like a video game or stream of data.

This is the roughly same problem as Mist has with websockets.

rawhat commented 10 months ago

Just to make sure I'm understanding, you mean the individual handler processes, right? If so, that definitely makes sense to me.

Separately, I do think it'd be useful to have the acceptor process able to receive other messages, but likely just for the graceful shutdown at the moment.

lpil commented 10 months ago

Yes, that's right 💜

rawhat commented 10 months ago

This is done 😄