Re: Eunet or EuLibnet or TCP socket library (or socket.e)

new topic     » goto parent     » topic index » view thread      » older message » newer message
Spock said...
ghaberek said...

You could accomplish a pseudo-asynchronous server by combining the select function with Multi-tasking ..

I have been reading about Finite State Machines. They seem well suited for solving the problem of parallel but independent actions. Once the single instance server core is stable I'll add an FSM to allow multiple connections in parallel. Muhahaha...

Spock

Ok. FSM has been added and seems to be working ok for multiple connections. What I now need is some guidance on timeouts for receiving large files. The basic process is

1. Connect to other machine
2. Receive message prefix indicating total length of the data
3. Receive next block of data
4. repeat 3 until data buffer reaches the length value
5. Close connection

There are several places for timeouts.

i) When the connection is made till the prefix is received
ii) Between each subsequent block of data
iii) The total time to receive all the data (optional?)

Are there any suggestions as to how long the maximum length of each stage chould be? I am also thinking that (barring network delays) the timeouts should be based somewhat on the number of active connections.

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu