On 2/19/09, Benoît Minisini <gam...@users.sourceforge.net> wrote: > > On 2/17/09, Benoît Minisini <gam...@users.sourceforge.net> wrote: > > > > Is there any way to get different TCP server objects with different > > > > ports to use a different socket object for read? I am trying to port > > > > my VB6 multiport communications server application to Gambas2 and (I > > > > think) I need something like that to get it to work. > > > > > > > I would say yes. I see nothing that prevents from creating several > > > SocketServer objects. > > > > That is not the issue, you can do that, but they all use the same > > socket_read sub. Or I my missing something here? > > > Hem, you are right, I didn't notice. > > Internallly the Socket object knows which ServerSocket created it, but you > don't have any access to it! > > As a workaround, I think you can use the port number to make the difference. >
I will look into that in the meantime. > > Maybe I will make a "Server" property in the Socket class to get the > ServerSocket object creator. > > And I can add an optional argument to the Accep() method to define the event > name of the created socket. > That would be great! Thanks. Regards, Joe1962 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user