Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameState ¶
type GameState struct {
// contains filtered or unexported fields
}
func NewGameState ¶
func NewGameState() *GameState
type GameStatus ¶
type GameStatus uint32
const ( GameStatusWaiting GameStatus = iota GameStatusDealing GameStatusPreFlop GameStatusFlop GameStatusTurn GameStatusRiver )
func (GameStatus) String ¶
func (gs GameStatus) String() string
type GameVariant ¶
type GameVariant uint8
const ( TexasHoldem GameVariant = iota Other )
func (GameVariant) String ¶
func (gv GameVariant) String() string
type Handshake ¶
type Handshake struct {
Version string
GameVariant GameVariant
GameStatus GameStatus
}
type Server ¶
type Server struct {
ServerConfig
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(cfg ServerConfig) *Server
func (*Server) HandleMessage ¶
func (*Server) SendHandshake ¶
type ServerConfig ¶
type ServerConfig struct {
ListenAddr string
Version string
GameVariant GameVariant
}
type TCPTransport ¶
type TCPTransport struct {
AddPeer chan *Peer
DelPeer chan *Peer
// contains filtered or unexported fields
}
func NewTCPTransport ¶
func NewTCPTransport(listenAddr string) *TCPTransport
func (*TCPTransport) ListenAndAccept ¶
func (t *TCPTransport) ListenAndAccept() error
Click to show internal directories.
Click to hide internal directories.