public void AcceptCallback(ref SelectControl selectControl, Socket listenSocket, Buf safeBuffer) { Socket clientSocket = listenSocket.Accept(); if (clientSocket.Connected) { String clientLogString = clientSocket.SafeRemoteEndPointString(); var dataHandler = new NpcSocketHandler(clientLogString, callback, npcExecutor, htmlGenerator); selectControl.AddReceiveSocket(clientSocket, dataHandler.InitialRecvHandler); } else { clientSocket.Close(); } }
// returns the number of bytes to respond with public abstract UInt32 HandleRecord(String clientString, Byte[] record, UInt32 offset, UInt32 offsetLimit, Buf sendBuffer, UInt32 sendOffset);
public OffsetLineParser(Buf buffer) { this.buffer = buffer; this.count = 0; this.nextLineStart = 0; }
public RecordServerHandler(String serviceName, Buf sendBuffer) { this.serviceName = serviceName; //this.socketToRecordParser = new Dictionary<Socket, RecordBuilder>(); this.sendBuffer = sendBuffer; }