[Gambas-user] Socket Limitations

Kadaitcha Man nospam.nospam.nospam at ...626...
Mon Jan 4 01:56:06 CET 2010


2010/1/4 Doriano Blengino <doriano.blengino at ...1909...>:

> This is the TCP scenario: you send data, and don't know what the hell
> those data have done - only that it is arrived. Never tried to speak FTP
> to a server which talks HTTP? Or to speak HTTP to a CIFS server?

Yes, I have. Many, many times.

> There
> must be a higher protocol, like your example below, which copes with
> requests and replies.

:)

I see we are on the right track, together.

>> Without a timeout I cannot create more than a single socket and be
>> certain that the remote server will accept it. I would be very happy
>> if socket (Socket and ServerSocket) accepted timeouts and raised
>> errors when the connection timed out, where timeout means a period of
>> time where there is no activity while a send or receive is in
>> progress. That, btw, is why Linux socket implements both a send and a
>> receive timeout.
>>
> Mmm, I think that trying to establish a connection is different than
> trying to send data to an already established one.

They are different, but I expect they could both use the same send_timeout.

> But I agree
> on the fact that some form of timeout must be in effect, at least for
> good precaution.

That is really good news, Doriano. I have enjoyed this discussion with
you and Benoit. Thanks.




More information about the User mailing list