Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe opens tcp listeners for the given the specified configuration
Types ¶
type ChatServer ¶
ChatServer is a TCP chat server capable of running on multiple ports
func (*ChatServer) Listen ¶
func (server *ChatServer) Listen(listener net.Listener)
Listen will accept connections on a the listener
func (*ChatServer) Serve ¶
func (server *ChatServer) Serve() error
Serve blocks and coordinates between listeners the server
type Config ¶
type Config struct {
Port string `json:"port"`
Host string `json:"host"`
LogFilePath string `json:"logFilePath"`
}
Config represents the configuration of the chat server
func LoadConfig ¶
LoadConfig loads the config file from the current directory or the default config if no config file exists
Click to show internal directories.
Click to hide internal directories.