Documentation
¶
Index ¶
- func DecodeWin1251(encoded []byte) string
- func EncodeWin1251(decoded string) []byte
- func ReadGameInfo(r io.Reader, full bool, game *EIGameInfo) error
- func ReadMasterResponse(r io.Reader, game *EIGameInfo) error
- func ReadServerInfo(r io.Reader, full bool, srv *EIServerInfo) error
- func ReadServersList(r io.Reader, full bool, res *[]EIServerInfo) error
- func WriteGameInfo(w io.Writer, full bool, game *EIGameInfo) error
- func WriteMasterResponse(w io.Writer, game *EIGameInfo) error
- func WriteServerInfo(w io.Writer, full bool, srv *EIServerInfo) error
- func WriteServersList(w io.Writer, full bool, servers []EIServerInfo) error
- type EIGameInfo
- type EIServerAddr
- type EIServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeWin1251 ¶
func EncodeWin1251 ¶
func ReadGameInfo ¶
func ReadGameInfo(r io.Reader, full bool, game *EIGameInfo) error
func ReadMasterResponse ¶
func ReadMasterResponse(r io.Reader, game *EIGameInfo) error
func ReadServerInfo ¶
func ReadServerInfo(r io.Reader, full bool, srv *EIServerInfo) error
func ReadServersList ¶
func ReadServersList(r io.Reader, full bool, res *[]EIServerInfo) error
func WriteGameInfo ¶
func WriteGameInfo(w io.Writer, full bool, game *EIGameInfo) error
func WriteMasterResponse ¶
func WriteMasterResponse(w io.Writer, game *EIGameInfo) error
func WriteServerInfo ¶
func WriteServerInfo(w io.Writer, full bool, srv *EIServerInfo) error
func WriteServersList ¶
func WriteServersList(w io.Writer, full bool, servers []EIServerInfo) error
Types ¶
type EIGameInfo ¶
type EIGameInfo struct { ClientID uint32 MasterToken uint32 Name string Quest string PlayersCount uint8 MaxPlayersCount uint8 HasPassword bool AllodIndex uint8 PlayerNames []string }
func (*EIGameInfo) Copy ¶
func (game *EIGameInfo) Copy() *EIGameInfo
Copy makes a full copy of the this EIGameInfo struct
func (*EIGameInfo) IsSentByOrigGame ¶
func (game *EIGameInfo) IsSentByOrigGame() bool
IsSentByOrigGame returns true if this game info looks like produced by original game
type EIServerAddr ¶
EIServerAddr represents server address. Maybe it makes sense to get rid of this and use net.Addr instead
func NewEIServerAddr ¶
func NewEIServerAddr(addr *net.UDPAddr) (eiAddr *EIServerAddr, err error)
func (*EIServerAddr) GetUDPAddr ¶
func (addr *EIServerAddr) GetUDPAddr() *net.UDPAddr
func (*EIServerAddr) String ¶
func (addr *EIServerAddr) String() string
type EIServerInfo ¶
type EIServerInfo struct { Addr net.UDPAddr EIGameInfo AppearTime time.Time LastUpdate time.Time Ping int }
func (*EIServerInfo) Copy ¶
func (srv *EIServerInfo) Copy() *EIServerInfo
Copy makes a full copy of this EIServerInfo struct
func (*EIServerInfo) Equals ¶
func (srv *EIServerInfo) Equals(srv2 *EIServerInfo) bool
func (*EIServerInfo) IP ¶
func (srv *EIServerInfo) IP() string
func (*EIServerInfo) String ¶
func (srv *EIServerInfo) String() string
Click to show internal directories.
Click to hide internal directories.