1. RE: tcp4u_connect()
- Posted by Ray Smith <smithr at ix.net.au> Apr 21, 2002
- 408 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
2. RE: tcp4u_connect()
- Posted by Ray Smith <smithr at ix.net.au> Apr 22, 2002
- 443 views
Hi Kat, The http4u_set_timeout() function is for http_ based functions only and not for tcp4u_connect(). I remember looking at this before and there is no way (without changing TCP4u) to change the timeout on connects or accepts. Ray Smith http://rays-web.com Kat wrote: > On 22 Apr 2002, at 6:06, 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. > > http4u_set_timeout > > > Description > Sets the timeout in seconds to use when using http4u functions. > The default timeout is 60 seconds.?????? > > Syntax > http4u_set_timeout(integer seconds) > > where, > seconds= seconds to timeout for. > > Returns > Nothing > > Example > http4u_set_timeout(60) > > Also, take a peek at asynchttp in the archives. > > Kat > >