![]() ![]() ![]() If you're considering TCP means you are thinking in terms of a stream ( exactly once in order messages) and using UDP will put the burden of fragmentation, retry and acknowledgment, duplicate detection and ordering in your app. You shouldn't even consider UDP if you're considering TCP too. Broadcast: UDP can broadcast to all listeners on a network segment. ![]() Speed: The fact that each message is routed individually means that you cannot hit a stream congestion like TCP can.This is one major reason why MMO games connected to hundred of thousands of clients use UDP. No need to store a system endpoint on the server for each client (ie.Now is easy to argue that if the target can handle a total loss of messages (which is possible) then why bother to send them in the first place? No delivery guarantee means your target must be prepared to deal with message loss.Lack of stream makes it hard to secure UDP: hard to do an authentication scheme that works on lossy exchange, and just as hard to protect the integrity and confidentiality of individual messages (no key state to rely on).packet size restriction means you can only send small messages (less than about 1.5k bytes).If in fact a connection is needed again going back to tcp udpĪny ideas where i shoudl beging and choosing which protocol and amount of ports i am going to need to assign? Say if the server has to support multiple clients that i only need to open 1 port or do i need to open 2?Īlso if a client crashes i need for it not to effect the SERVER hence the server can either ignore it and close connection if one is open or timeout a connection. ![]() So which way do i go and can c# support both? Advantages /Disadvantages? I am looking for soome good examples with c# for TCP or UDP. net 3.5 support everything or do i need to go on the hunt for some component? I have no problem in creating the server and client but with tcp i am unsure whcih way to go. and the server sends MESSSAGES to the client. basically multiple clients will connect to the server. Can anyone help, i trying to figure what i need to do, i have been given the tasks of writing a server and a client in TCP (UDP). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |