Exemple #1
0
 // I think host and port will get combined with "resource" as an RCSymbolScalar here.
 public TcpHttpClient(long handle, RCSymbolScalar hostandport)
 {
     _handle = handle;
     _host   = (string)hostandport.Part(1);
     _port   = (long)hostandport.Part(2);
     // _uri = new Uri("http://" + _host + ":" + _port.ToString ());
     _inbox  = new TcpReceiveBox();
     _client = new WebClient();
     _client.UploadDataCompleted   += UploadDataCompleted;
     _client.DownloadDataCompleted += DownloadDataCompleted;
 }
Exemple #2
0
 public TcpClient(long handle, RCSymbolScalar symbol, Tcp.Protocol protocol, int timeout)
 {
     _protocol     = protocol;
     _handle       = handle;
     _host         = (string)symbol.Part(1);
     _port         = (long)symbol.Part(2);
     _inbox        = new TcpReceiveBox();
     _outbox       = new TcpOutBox();
     _buffer       = new TcpMessageBuffer();
     _timeout      = timeout;
     _timeoutTimer = null;
 }