public ClientInfo(Socket cl, ConnectionRead read, ConnectionReadBytes readevt, ClientDirection d, bool StartNow, EncryptionType encryptionType) { sock = cl; sock.SendTimeout = 20000; // 20 seconds timeout sock.LingerState = new LingerOption(false, 0); sock.NoDelay = true; // NOT WORKING IN EMULATOR sock.ExclusiveAddressUse = true; buffer = ""; OnReadBytes = readevt; encType = encryptionType; encStage = 0; encComplete = encType == EncryptionType.None; OnRead = read; MessageType = MessageType.EndMarker; dir = d; delim = "\n"; id = NextID; // Assign each client an application-unique ID unchecked { NextID++; } //t = new ClientThread(this); if (StartNow) { BeginReceive(); } }
public ClientInfo(Socket cl, ConnectionRead read, ConnectionReadBytes readevt, ClientDirection d, bool StartNow, EncryptionType encryptionType) { sock = cl; buffer = ""; OnReadBytes = readevt; encType = encryptionType; encStage = 0; encComplete = encType == EncryptionType.None; OnRead = read; MessageType = MessageType.EndMarker; dir = d; delim = "\n"; id = NextID; // Assign each client an application-unique ID unchecked { NextID++; } //t = new ClientThread(this); if (StartNow) { BeginReceive(); } }
public ClientInfo(Socket cl, ConnectionRead read, ConnectionReadBytes readevt, ClientDirection d, bool StartNow, EncryptionType encryptionType) { sock = cl; buffer = ""; OnReadBytes = readevt; encType = encryptionType; encStage = 0; encComplete = encType == EncryptionType.None; OnRead = read; MessageType = MessageType.EndMarker; dir = d; delim = "\n"; id = NextID; // Assign each client an application-unique ID unchecked { NextID++; } //t = new ClientThread(this); if (StartNow) BeginReceive(); }
//public ClientInfo(Socket cl, ConnectionRead read, ConnectionReadBytes readevt, ClientDirection d) : this(cl, read, readevt, d, true, EncryptionType.None) {} public ClientInfo(Socket cl, ConnectionRead read, ConnectionReadBytes readevt, ClientDirection d, bool StartNow) : this(cl, read, readevt, d, StartNow, EncryptionType.None) { }
public ClientInfo(Socket cl, ConnectionRead read, ConnectionReadBytes readevt, ClientDirection d, bool StartNow, EncryptionType encryptionType) { sock = cl; sock.SendTimeout=20000; // 20 seconds timeout sock.LingerState = new LingerOption(false,0); sock.NoDelay = true; // NOT WORKING IN EMULATOR sock.ExclusiveAddressUse = true; buffer = ""; OnReadBytes = readevt; encType = encryptionType; encStage = 0; encComplete = encType == EncryptionType.None; OnRead = read; MessageType = MessageType.EndMarker; dir = d; delim = "\n"; id = NextID; // Assign each client an application-unique ID unchecked { NextID++; } //t = new ClientThread(this); if (StartNow) BeginReceive (); }