Open firepear opened 4 months ago
The server should also know about its active connections so that they can be checked for status, for messaging and possibly other purposes.
Also, some info currently stowed in the Server struct should be moved into a Conn struct like the one client
has. Which would mean that struct should migrate to the main petrel
package.
for now, just get server working with the changes made to petrel and client. new tickets for further improvements.
first thing to do is spawn petrel.Conn
instances inside petrel.Server.sockAccept
and hand those off to Server.connServer
rather than the raw net.Conn
that gets passed now.
this will go a long way toward making our calls match up with what petrel now expects, due to changes in the client
Needs to store info about connections. Right now all there is, is a conn id. it would probably be smart to at least grab an IP and stow that in a connections table or something, so that it can be looked up for reporting?