Esempio n. 1
0
        private void DataWasRecieved(byte [] pData, int pDataLength, SocketClientBuffer pSocket)
        {
            SocketServerDataEventArgs tmpEventArgs = new SocketServerDataEventArgs(pData, pDataLength, pSocket);

            this._BytesReceived += pDataLength;
            OnDataRecieved(tmpEventArgs);
        }
Esempio n. 2
0
 protected virtual void OnBackspaceRecieved(SocketServerDataEventArgs pEventArgs)
 {
     if (_BackspaceRecieved != null)
     {
         //Invoke the event delegate
         _BackspaceRecieved(this, pEventArgs);
     }
 }
Esempio n. 3
0
 private void NewLineRecieved(object pSender, SocketServerDataEventArgs pEventArgs)
 {
     try
     {
         //Send the prompt.
         this.SendPrompt(pEventArgs.Socket);
     }
     catch
     {
     }
 }
Esempio n. 4
0
 private void ServerDataRecieved(object pSender, SocketServerDataEventArgs pEventArgs)
 {
     //Some data is recieved -- echo it back.
     if (this._RemoteEcho)
     {
         //Don't echo it if it is a backspace and there is no buffer
         if (!((pEventArgs.Socket._LineBuffer.Length < 1) && (pEventArgs.IncomingDataBytes[0] == 127)))
         {
             _SocketServer.SendData(pEventArgs.IncomingDataBytes, pEventArgs.Socket);
         }
     }
 }
Esempio n. 5
0
 private void ServerLineRecieved(object pSender, SocketServerDataEventArgs pEventArgs)
 {
     //Some data is recieved (a line of it, in fact) .. Send it to the master control to parse it.
     CommandIsRecieved(pEventArgs.IncomingDataString, pEventArgs.Socket);
 }
Esempio n. 6
0
        private void BackspaceWasRecieved(SocketClientBuffer pSocket)
        {
            SocketServerDataEventArgs tmpEventArgs = new SocketServerDataEventArgs(Convert.ToChar(127).ToString(), pSocket);

            OnBackspaceRecieved(tmpEventArgs);
        }
Esempio n. 7
0
        private void TabWasRecieved(SocketClientBuffer pSocket)
        {
            SocketServerDataEventArgs tmpEventArgs = new SocketServerDataEventArgs("\t", pSocket);

            OnTabRecieved(tmpEventArgs);
        }
Esempio n. 8
0
        private void NewLineWasRecieved(SocketClientBuffer pSocket)
        {
            SocketServerDataEventArgs tmpEventArgs = new SocketServerDataEventArgs("\n", pSocket);

            OnNewLineRecieved(tmpEventArgs);
        }
Esempio n. 9
0
        private void LineWasRecieved(string pLine, SocketClientBuffer pSocket)
        {
            SocketServerDataEventArgs tmpEventArgs = new SocketServerDataEventArgs(pLine, pSocket);

            OnLineRecieved(tmpEventArgs);
        }