jefflunt / nmspec

MIT License
1 stars 0 forks source link

Change messengers so that they take a host and port to connect to #10

Closed jefflunt closed 2 years ago

jefflunt commented 2 years ago

As of this writing, messengers take a socket as the only constructor parameter. However, if nmspec is to abstract away most of the connection details, then passing a host and port makes more sense as the interface.

In addition to switching over to host and port, messengers should also support:

jefflunt commented 2 years ago

This turns out not really to be feasible because on the server-side of a messenger the call to accept in order to accept an incoming TCP connection returns a socket directly. As such, constructors must accept this socket in order to work for both client/server sides.

This doesn't really change anything in terms of capabilities and limitations, except that I thought it would make things easier to deal with. Instead it made it harder.