tags:

views:

18

answers:

1

In my application, client can request service from server side while server can send events to client side.

In .NET remoting the event mechanism is implemented by bi-directional channels, while in this case the actual client plays another role of "server" for events. Normally the client will open a free port for this kind of communication.

When I run the netstat CMD in server side, I can see this server established many connection to others clients via different ports.

My problem is when some clients are closed out, the connection to the above ports of those clients shall not be visible again. But actually not...

Anybody know how to release the connection from server to clients?

A: 

You have to dispose your connection objects. Did you do it ?

[EDIT] My guess is that such objects do have underlying connections open. Those objects shall implement the IDisposable interface and .Dispose() must called and release the resources (connections/ports in your case) hold by your objects. Hope that helps :-/

Seb
I have two kinds of objects: SAO and CAO. Do you mean the server need to explicitly dispose the CAOs? Is it enough I just disconnect those CAOs by RemotingService.Disconnect(obj)?Could you explain a little bit moreThanks
cui chun