public ServerSocket(string _ipAddressPort, ConnectMethod _connect = null, DisconnectMethod _disconnect = null, DecodePacketMethod _decodePacket = null, int _bufferSize = 1024, int _backLog = 100) { port = int.Parse(_ipAddressPort.Split(new char[] { ':' })[1]); connectMethod = _connect; disconnectMethod = _disconnect; decodePacketMethod = _decodePacket; bufferSize = _bufferSize; backLog = _backLog; }
public ServerSocket(int _port, ConnectMethod _connect = null, DisconnectMethod _disconnect = null, DecodePacketMethod _decodePacket = null, int _bufferSize = 1024, int _backLog = 100) { port = _port; connectMethod = _connect; disconnectMethod = _disconnect; decodePacketMethod = _decodePacket; bufferSize = _bufferSize; backLog = _backLog; }
public ClientSocket(string _ipAddressPort, ConnectMethod _connect = null, DisconnectMethod _disconnect = null, DecodePacketMethod _decodePacket = null, int _bufferSize = 1024) { ipAddress = _ipAddressPort.Split(new char[] { ':' })[0]; port = int.Parse(_ipAddressPort.Split(new char[] { ':' })[1]); connectMethod = _connect; disconnectMethod = _disconnect; decodePacketMethod = _decodePacket; bufferSize = _bufferSize; buffer = new byte[_bufferSize]; }
public ClientSocket(string _ipAddress, int _port, ConnectMethod _connect = null, DisconnectMethod _disconnect = null, DecodePacketMethod _decodePacket = null, int _bufferSize = 1024) { ipAddress = _ipAddress; port = _port; connectMethod = _connect; disconnectMethod = _disconnect; decodePacketMethod = _decodePacket; bufferSize = _bufferSize; buffer = new byte[_bufferSize]; }
public PacketQueue(DecodePacketMethod _decodePacket = null) { decodePacketMethod = _decodePacket; }