Programming UNIX Sockets in C - Frequently Asked Questions :: 5.1 When should I use UDP instead of TCP? UDP is good for sending messages which will cause the next system call on the socket to return ECONNREFUSED . http://docs.linux.cz/programming/c/sock-faq/unix-socket-faq-5.htmlHOME | hi guys, i'm trying to write a client app that does reliable transmission. ie. if the server goes down, the client should keep on trying to transmit until the data gets sent.
sure tcp does reliable transmission, but somehow perl (that's what i'm using)'s send() function always returns even before the actual data gets put onto the wire. This means that if i disconnect the server, the send() will still return as if the data has been sent! The error will only be detected after a few packets, but that's ridiculous. The Design of Software - C# and Socket related question (requires :: 1 post - Last post: Feb 14, 2006Shutdown and Close which sends out a TCP RST, that resets the connection. . before any socket send()'s, then as soon as recv() returns 0, http://discuss.joelonsoftware.com/default.asp?design.4.308671.13HOME |
does anybody know of any modules that i can use? i've tried eg. Net::Telnet, but the same thing happens.
It's not just Perl's send() that does that; you'd find that C's send(), Knowledge:Network Key Problems - OptiTexHelpEn:: Dec 17, 2007 If it does not return, check that the correct parameters are written in the Unable to get socket number. Applies to IPX and TCP/IP. http://www.optitex.com/Help/en/index.php/Knowledge:Network_Key_ProblemsHOME | Net2: Examples:: TCP/IP is a reliable way to send information back and forth between . No that we get the // socket from the event. You can use the socket to tell you http://gameprogrammer.com/net2/net2-2.htmlHOME |
and well ANY language's send(), I imagine, would do the same
thing... That's just the way it works... You are just writing data
into your send queue, which will be actually transmitted at some
later point in time, when your system's TCP/IP stack feels like
doing so... You have no control over the process; TCP is the
one responsible for reliable delivery of data... Believe me, if IT
can't get the data there, there's no way YOU are going to, on
your own, either... But, if you really want that sort of control,
well don't use TCP... Because, TCP specifically takes away
that control from you, so that IT can handle it...
ur first para seems to be a bit contradictary - reliable transfer and if server goes down how come data can be transferd to it!!!???
on second para, well in my last post , i had the answer as use setsockopt().i have not tried it out , but Michael says so, so it will help. set less timeouts and it may help.
How much does getting a small tattoo on your hip/stomach hurt?
Do anyone else have an itchy anus? ?
|