network

package
v0.0.0-...-35db75a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DofusSocket

type DofusSocket struct {
	Channel chan (string)
	// contains filtered or unexported fields
}

func NewDofusSocket

func NewDofusSocket(conn net.Conn) *DofusSocket

func (*DofusSocket) Close

func (socket *DofusSocket) Close()

func (*DofusSocket) Initialize

func (socket *DofusSocket) Initialize(conn net.Conn)

Initialize is a Method to initialize socket conn

func (*DofusSocket) Listen

func (socket *DofusSocket) Listen()

Listen Blocks forever and forward received messages from socket to channel

func (*DofusSocket) Send

func (socket *DofusSocket) Send(message string)

Send a message in socket

func (*DofusSocket) WaitForPacket

func (socket *DofusSocket) WaitForPacket() (string, error)

WaitForPacket blocks until a message is available to read in the channel

type HandlerSocket

type HandlerSocket struct {
	// contains filtered or unexported fields
}

func NewHandlerSocket

func NewHandlerSocket(dofusSocket *DofusSocket) *HandlerSocket

func (HandlerSocket) Send

func (socket HandlerSocket) Send(message string)

Send a message in socket

func (HandlerSocket) WaitForPacket

func (socket HandlerSocket) WaitForPacket() (string, error)

WaitForPacket blocks until a message is available to read in the channel

type ProxySocket

type ProxySocket struct {
	*DofusSocket
}

func NewProxySocket

func NewProxySocket(conn net.Conn) *ProxySocket

func (ProxySocket) Send

func (socket ProxySocket) Send(message string)

Send a message in socket

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL