public TcpClientTransportSink (string url)
{
string objectUri;
- _host = TcpChannel.ParseTcpURL (url, out objectUri, out _port);
+ string port;
+
+ TcpChannel.ParseTcpURL (url, out _host, out port, out objectUri);
+
+ try {
+ if (port != null)
+ _port = Convert.ToInt32 (port);
+ else
+ _port = 0;
+ } catch {
+ _host = null;
+ _port = -1;
+ }
}
public IDictionary Properties
// response of the server
connection = TcpConnectionPool.GetConnection (_host, _port);
- TcpMessageIO.SendMessageStream (connection.Stream, requestStream, headers, connection.Buffer);
+ TcpMessageIO.SendMessageStream (connection.Stream, requestStream, headers, connection.Buffer, isOneWay);
connection.Stream.Flush ();
if (!isOneWay)
{
sinkStack.Push (this, connection);
- ThreadPool.QueueUserWorkItem (new WaitCallback(ReadAsyncTcpMessage), sinkStack);
+ ThreadPool.QueueUserWorkItem (new WaitCallback(data => {
+ try {
+ ReadAsyncTcpMessage (data);
+ } catch {}
+ }), sinkStack);
}
else
connection.Release();