internal ServerConnection(Socket socket, TlsSecurityInformation tlsSecInfo, ConnectionParameters parameters, Server server, ASDUQueue asduQueue, bool debugOutput) { connectionsCounter++; connectionID = connectionsCounter; this.parameters = parameters; this.server = server; this.asduQueue = asduQueue; this.debugOutput = debugOutput; ResetT3Timeout(); maxSentASDUs = parameters.K; this.sentASDUs = new SentASDU[maxSentASDUs]; //TODO only needed when connection is activated receivedASDUs = new Queue <ASDU> (); waitingASDUsHighPrio = new Queue <BufferFrame> (); socketStream = new NetworkStream(socket); this.socket = socket; this.tlsSecInfo = tlsSecInfo; Thread workerThread = new Thread(HandleConnection); workerThread.Start(); }
public Server(ConnectionParameters parameters, TlsSecurityInformation securityInfo) { this.parameters = parameters; this.securityInfo = securityInfo; if (securityInfo != null) { this.localPort = 19998; } }