TCP uses a conection bassed system to transfer data. First it establises a conection between the computers. then a packet is send between the computers. Then an acknowledgement it sent to make sure that all of the packet arived. TCP also is able to sequence the packets so that they are able to be sent in a specific order
UDP does not make a conection with the target computer before sending the packets. it just sends the packets and does not wait for a acknowledgement. There is so sequencing so it just sends in any order. There is no error checking so if packets dont arrive or arrive damaged it cannot tell.
UDP | TCP | |
---|---|---|
Speed | Fast | Slow |
error correction | no error correction | sends acks to mack sure packets are correct |
Sequencing | no sequencing packets are send it a random order | packets are sequinced befor being sent |