예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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];
 }
예제 #4
0
 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];
 }
예제 #5
0
 public PacketQueue(DecodePacketMethod _decodePacket = null)
 {
     decodePacketMethod = _decodePacket;
 }