Hello All


i have an IP : and my friend has an IP :

and i want to send file(200KB) . what can i do?

sory for my english.:)

i used google ;)
but when i tested in localhost progamm has sent only 5KB

and which would i use? udp or tcp?

also, i want to send binary file(exe)

udp or tcp?

UDP is an "unreliable" transfer protocol, ie if a packet is dropped or lost, it doesn't care. This is for high-demand but low-expectation connections (think streaming video: you don't care if you miss a frame or two because you can still see the entire video).

TCP is a reliable transfer protocol, with error correction. This method inherently is slower than udp as it needs to guarantee that every packet it sent successfully, thus it's important to use when you need high-fidelity transfers (ie, file transfers).

Read up on the different protocols here.

THANK YOU ALL but today i decided to start C++ :D

You do realize that C++ only supports ethernet (class 1) protocols and you must write your own wrapper to use higher level protocols (IP, TCP, + UDP) and generate your own packets.