summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/ConnectRequestHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Ice/ConnectRequestHandler.cs')
-rw-r--r--csharp/src/Ice/ConnectRequestHandler.cs34
1 files changed, 13 insertions, 21 deletions
diff --git a/csharp/src/Ice/ConnectRequestHandler.cs b/csharp/src/Ice/ConnectRequestHandler.cs
index b8e3363577e..d53aef9513a 100644
--- a/csharp/src/Ice/ConnectRequestHandler.cs
+++ b/csharp/src/Ice/ConnectRequestHandler.cs
@@ -35,7 +35,7 @@ namespace IceInternal
return previousHandler == this ? newHandler : this;
}
- public bool sendAsyncRequest(ProxyOutgoingAsyncBase outAsync, out Ice.AsyncCallback sentCallback)
+ public int sendAsyncRequest(ProxyOutgoingAsyncBase outAsync)
{
lock(this)
{
@@ -47,11 +47,10 @@ namespace IceInternal
if(!initialized())
{
_requests.AddLast(outAsync);
- sentCallback = null;
- return false;
+ return OutgoingAsyncBase.AsyncStatusQueued;
}
}
- return outAsync.invokeRemote(_connection, _compress, _response, out sentCallback);
+ return outAsync.invokeRemote(_connection, _compress, _response);
}
public void asyncRequestCanceled(OutgoingAsyncBase outAsync, Ice.LocalException ex)
@@ -71,10 +70,9 @@ namespace IceInternal
if(p.Value == outAsync)
{
_requests.Remove(p);
- Ice.AsyncCallback cb = outAsync.completed(ex);
- if(cb != null)
+ if(outAsync.exception(ex))
{
- outAsync.invokeCompletedAsync(cb);
+ outAsync.invokeExceptionAsync();
}
return;
}
@@ -161,14 +159,13 @@ namespace IceInternal
foreach(ProxyOutgoingAsyncBase outAsync in _requests)
{
- Ice.AsyncCallback cb = outAsync.completed(_exception);
- if(cb != null)
+ if(outAsync.exception(_exception))
{
- outAsync.invokeCompletedAsync(cb);
+ outAsync.invokeExceptionAsync();
}
}
_requests.Clear();
- System.Threading.Monitor.PulseAll(this);
+ Monitor.PulseAll(this);
}
}
@@ -248,13 +245,9 @@ namespace IceInternal
{
try
{
- Ice.AsyncCallback sentCallback = null;
- if(outAsync.invokeRemote(_connection, _compress, _response, out sentCallback))
+ if((outAsync.invokeRemote(_connection, _compress, _response) & OutgoingAsyncBase.AsyncStatusInvokeSentCallback) != 0)
{
- if(sentCallback != null)
- {
- outAsync.invokeSentAsync(sentCallback);
- }
+ outAsync.invokeSentAsync();
}
}
catch(RetryException ex)
@@ -269,10 +262,9 @@ namespace IceInternal
catch(Ice.LocalException ex)
{
exception = ex;
- Ice.AsyncCallback cb = outAsync.completed(ex);
- if(cb != null)
+ if(outAsync.exception(ex))
{
- outAsync.invokeCompletedAsync(cb);
+ outAsync.invokeExceptionAsync();
}
}
}
@@ -308,7 +300,7 @@ namespace IceInternal
_proxies.Clear();
_proxy = null; // Break cyclic reference count.
- System.Threading.Monitor.PulseAll(this);
+ Monitor.PulseAll(this);
}
}