Beispiel #1
0
        private void Receive(Socket handler)
        {
            StateObject state = new StateObject();

            state.workerSocket = handler;

            WriteLog(LogStrings.WaitingToReceiveMessageFromClient(GetSocketName(handler)));

            handler.BeginReceive(state.buffer, 0, state.BufferSize, 0, new AsyncCallback(ReceiveCallback), state);
        }