RE: tcp4u_connect()
- Posted by Ray Smith <smithr at ix.net.au> Apr 21, 2002
- 407 views
Hi Chris, euTCP4u (and TCP4u as you mention) can't handle this. In C (or C++) this is overcome by using threads which Euphoria doesn't have. If you have full control of the Server and Client software you can use euLibnet. euLibnet has a polling mechanism which allows multiple connections to be running at once. The down side is that it is only of use if the server using the Libnet API's. If you don't have access to the server side than I think the Euphoria Sockets wrapper is your only choice. Ray Smith, http://rays-web.com Chris Bensler wrote: > here is the dilemna: > > I need to be able to make multiple connections simultaneously. > > tcp4u allows for multiple sockets, but there is no timeout setting for > tcp4u_connect(), and it appears to be 1 minute. Also, the routine > doesn't return until it makes contact or times out, so potentially, my > program will, and it does, stall for one minute while waiting to > timeout. > > When I need to make anywhere from 20 to 40 connections, or more, at > the same time, waiting for 1 minute for each socket before being able to > > do _anything_ else, isn't an option. > > Even the duration of the timeout isn't so much of a problem, it's the > fact that the function doesn't return until the connection is finished. > > What can I do? I know that the timeout is not controlled in euTcp4u. > > > Chris