In simple words, what is the difference? Is it same as a server (the end point). Is it the same as transparent UDP? Please clear it for me.
None. UDP isn't really a client-server protocol, so 'endpoint' is a better term than 'client'.
Related
Do tcp sockets have a built in method for calculating data corruption?
Thanks
Yes, the TCP protocol has a checksum. That checksum is small and using a weak algorithm, though. You cannot trust it with your life. It might be enough for youm or not. There are papers about it failing.
Note that sockets are a distinct concept from the TCP protocol. I assume you meant TCP, not sockets.
If I was to implement a server to handle multiple clients connecting simultaneously would it be better to use TCP?
Not taking efficiency into account (I know know UDP is quicker, but unreliable).
In UDP you can't have sockets for each client connection?
Because in UDP the socket is identified by only the destination port number (right?).
In Java, I know it is easy to create a multi-threaded server to handle multiple clients at the same time in TCP. But can it be done in UDP? I imagine that it would be very complicated.
I'm just trying to get an understanding of UDP here (I don't want to actually implement anything).
It depends on what kind of server you are developing. If you need your clients to stay connected and ready to receive data from server(for example a push service) you should implement it using TCP. If you want to implement a simple request-response service, then UDP is better choice.
When do you actually use TCP as a binding element and when do you use HTTP?
I want to know scenarios and performance issues.
TCP is must faster as compared to http. Even tcp is more secure and reliable.
Please refer http://msdn.microsoft.com/en-us/library/ms733769.aspx for more detailed information.
Actually choosing binding depends on many factors and reading above article will give you insight in more dept.
TCP will send less "valueless" data than Http. Http will add a lot of data when serializing it.
You may use TCP in a local network or a vpn.
Here you can see a chart of how to choose between these bindings:
http://bloggingabout.net/blogs/dennis/archive/2006/12/01/WCF-Binding-decision-chart.aspx
Reading about WCP (woof, what a monster of a subject), and just into the earlier stages of what transports are available. I note that TCP is available, but not UDP. Is this because UDP is not always reliable...lossy with packets ?
Thanks,
Scott
No official reason for that. Who knows may be we will have netUDPBinding in coming releases.
But most probably they gave priority to TCP as it is reliable.
I would certainly think so. UDP is useful for streaming video or audio, not for reliable messaging.
I know that UDP is inherently unreliable, but when connecting to localhost I would expect the kernel handles the connection differently since everything can be handled internally. So in this special case, is UDP considered a reliable protocol, or will the kernel still potentially junk some packets if buffers are overrun?
I have seen UDP to localhost dropping packets. We think we were overloading the kernel queue. All we know for sure is that it was dropping packets.
I repeat a previous answer to a related question. To remain portable always anticipate your UDP sockets might drop packets or receive out of order data.
I don't think that UDP (or any other network protocol) says anything about different behavior when connecting to localhost. So the answer will depend on the specific kernel that you're using. Best to assume that UDP will behave like UDP.