The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths. The protocol was designed by David P. Reed in 1980 and formally defined in RFC 768.
UDP uses a simple transmission model without implicit handshaking dialogues for providing reliability, ordering, or data integrity...
In computing, the Two Generals' Problem is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. It is related to the more general Byzantine Generals' Problem (though published long before that later generalization) and appears often in introductory classes about computer networking (particularly with regard to the Transmission Control Protocol), though it can also apply to other types of communication. It is also an important concept in epistemic logic, and the importance of common knowled...
it's not something that protocol provides, you are going to build TCP from scratch. but this time you end up sacrificing bandwidth for transmission speed.
It's not transmission speed. Once you're connected, sending a TCP packet under ideal circumstances will arrive at the exact same moment a UDP packet would
@Gajet SSH is encrypted traffic, which takes a lot more handshaking than regular TCP. Pings are ICMP, not TCP. Maybe you should take a networks class before shouting.
There's some steps missing once you have the IP: Client sends SYN to server Servers sends SYNACK to client Client sends ACK to server Client sends HTTP request to server Server sends reply Client sends request after request for images and external files Client sends SYN to ad provider Server replies with file after file Ad provider sends SYNACK Client replies to Ad provider with an ACK Client sends request(s) to Ad provider Ad provider sends you ads You see the website
No, each packet has a sequence number, so it instantly knows if the packet is out of order or not
IF the packet is out of order, yes, TCP will hold on to the packet until order is restored
Whereas UDP will just deliver the packet anyway
So with TCP: Packet #1 is received, and processed *instantly* Packet #3 arrives and is held, because it is out of order Packet #2 arrives and is processed immediately followed by the processing of #3
meh, I'll just add your info where I think it works
ok
well... I ran it with the new ip and port. It says "Sending a datagram to the receiver... Finished sending. Now trying to receive data back. Receiving datagrams..."
@Gajet: Ping statistics for 178.131.10.135: Packets: Sent = 2800, Received = 2778, Lost = 22 (0% loss), Approximate round trip times in milli-seconds: Minimum = 360ms, Maximum = 1949ms, Average = 458ms
Ping statistics for 178.131.10.135: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 372ms, Maximum = 478ms, Average = 415ms
Speaking of lost data, how do you handle connection loss in your games? Do you try to reestablish a connection, or do you quit immediately when the connection is lost?
@Gajet Does that matter? Packets can get lost anywhere, and the fact that packets can get lost is enough to make sure people implement reliable transmission methods for important data
Ping statistics for 64.34.119.12(stackexchange.com): Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 73ms, Maximum = 210ms, Average = 120ms
Ping statistics for 178.131.10.135: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 372ms, Maximum = 478ms, Average = 415ms
Ping statistics for 178.131.10.135: Packets: Sent = 1000, Received = 999, Lost = 1 (0% loss), Approximate round trip times in milli-seconds: Minimum = 397ms, Maximum = 637ms, Average = 459ms