Ejemplo n.º 1
0
 private int WriteData(byte[] data)
 {
     if (mTransmitCallback != null)
     {
         TextDataFrame dataFrame = new TextDataFrame(SessionId, DataFrameTypes.Data, false, true, DateTime.Now);
         dataFrame.SetBuffer(data, 0, data.Length);
         mTransmitCallback(dataFrame);
     }
     if (SendDataCallback != null)
     {
         return(SendDataCallback(data));
     }
     return(-1);
 }
Ejemplo n.º 2
0
 internal void ParseRawData(byte[] data, bool isOutcome, DateTime timeStamp, bool isFromFile)
 {
     if (data != null && data.Length > 0)
     {
         TextDataFrame frame = new TextDataFrame(SessionId, DataFrameTypes.Data, isFromFile, isOutcome, timeStamp);
         frame.SetBuffer(data, 0, data.Length);
         if (mTransmitCallback != null)
         {
             mTransmitCallback(frame);
         }
         if (ReceiveFrameCallback != null)
         {
             ReceiveFrameCallback(frame);
         }
     }
 }