Socket disposing after some time

D

deepak

Hi There,

i have an socket server and client , some how the listener socket is
getting disposed after some time for some reason .
is there any expiry period associated with the socket , how do i set/
control the expiry period if any .

i am using Socket class of .net 2.0

the error ocuured was

Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset,
Int32 size, SocketFlags socketFlags, SocketError& errorCode)
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset,
Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.Socket.Send(Byte[] buffer)
at PubSub.ChannelListener.receive(String msg)


any suggestions/comments will be highly helpful.


Thanks
Deepak
 
D

DEE

since the reference of this socket is in main class , i do not think
this would be because GC is collecting it .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top