Make your socket public so you can access it even from other classes. P.S. It is not reasonable to make the whole socket public, just make some public function which can write or read data from the socket, that's it.
2009/11/24 alex <[email protected]> > Hello, > > My program is connected to a box. I connect to the box thanks to a > socket. My problem is: > > I open an other module of my program. I can't have access to the > instance of my socket. So I would like to get the active TCP > connections and get the related socket. > > I tried with the method GetActiveTCPConnections. I see my TCP > connections. How can I get the related socket? > > I can only have one TCP connection on the box. So if I want to connect > one more time I have an exception. And If I disconnect my socket and > reconnect. I think it is not the best solution. > > Do you have an idea? >
