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

            this._BytesReceived += pDataLength;
            OnDataRecieved(tmpEventArgs);
        }
Exemple #2
0
 protected virtual void OnBackspaceRecieved(SocketServerDataEventArgs pEventArgs)
 {
     if (_BackspaceRecieved != null)
     {
         //Invoke the event delegate
         _BackspaceRecieved(this, pEventArgs);
     }
 }
Exemple #3
0
 private void NewLineRecieved(object pSender, SocketServerDataEventArgs pEventArgs)
 {
     try
     {
         //Send the prompt.
         this.SendPrompt(pEventArgs.Socket);
     }
     catch
     {
     }
 }
Exemple #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);
         }
     }
 }
Exemple #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);
 }
Exemple #6
0
        private void BackspaceWasRecieved(SocketClientBuffer pSocket)
        {
            SocketServerDataEventArgs tmpEventArgs = new SocketServerDataEventArgs(Convert.ToChar(127).ToString(), pSocket);

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

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

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

            OnLineRecieved(tmpEventArgs);
        }