Documentation ¶
Overview ¶
Package server provides server functionality for the Chat application
Package server provides server functionality for the Chat application
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { // contains filtered or unexported fields } // }}}
Server holds private information related to the server
func (*Server) Connect ¶
Connect attempts to establish a new connection, returning an error should anything go wrong
func (*Server) Exit ¶
func (s *Server) Exit()
Exit exits the program, closing any established connections prior to doing so
func (*Server) List ¶
func (s *Server) List()
List lists the IP addresses and port numbers associated with all currently established connections
func (*Server) Listen ¶
func (s *Server) Listen()
Listen uses the servers listener to continuously accept incoming TCP connections
func (*Server) Send ¶
Send attempts to send a given message to the connection associated with the given connection id, returning an error should anything go wrong
func (*Server) SetApplication ¶
func (s *Server) SetApplication(app types.Application)
SetApplication sets the application of the server, since we make the server prior to making the application