Jan Varga wrote:
> I have two problems after converting to new interfaces
>
>
> 1. How to correctly close connection ?
>
> Before I used:
> nsCOMPtr<nsIChannel> channel; // somehow initialized
> channel->Cancel(NS_BINDING_ABORTED);
> channel=nsnull;
>
> Now I have nsCOMPtr<nsIRequest> readRequest and writeRequest
> Now, how to really close opened connection ?
Canceling either the readRequest or the writeRequest with an error will
close the connection. The connection will also be closed when the last
reference to the transport is removed.
>
> 2. AsyncWrite() is blocked after calling AsyncRead()
>
> AsyncWrite() is working (I mean OnStartRequest() and onStopRequest() is
> called) until I need read
> from channel/request. After first calling of AsyncRead(), AsyncWrite is
> probably blocked.
>
> I forgot to mention that I'm using nsISocketTransportService to create
> nsITransport.
>
>
I'm not sure I follow. Can you elaborate on how you are using the
socket transport. Thx!
Darin