Beispiel #1
0
 public TcpStreamMessage(IPAddress inIpAddress, int inPortNumber = DefaultIpPort, TcpStreamMessageType inMessageType = TcpStreamMessageType.None)
 {
     this._ipAddress   = inIpAddress;
     this._portNumber  = inPortNumber;
     this._dataStream  = new MemoryStream();
     this._messageType = inMessageType;
 }
Beispiel #2
0
        private string GetResponseMessage(TcpStreamMessageType messageType)
        {
            string msg = "";

            switch (messageType)
            {
            case TcpStreamMessageType.Order:
                //msg = "3,T,Success";
                break;

            case TcpStreamMessageType.Group:
                //msg = "5,T,Success";
                break;

            case TcpStreamMessageType.Item:
                //msg = "7,T,Success";
                break;

            default:
                break;
            }

            // at the implementation of this class, the response message was no longer required.
            // Keeping the old reponse messages in the comments, just in case if we need them
            return(msg);
        }
Beispiel #3
0
 public TcpStreamMessage(string inIpAddress = DefaultIpAddress, int inPortNumber = DefaultIpPort, TcpStreamMessageType inMessageType = TcpStreamMessageType.None)
 {
     IPAddress.TryParse(inIpAddress, out _ipAddress);
     _portNumber      = inPortNumber;
     _messageType     = inMessageType;
     this._dataStream = new MemoryStream();
 }