To make it simple, imagine a warehouses complex that has their each address (similar to IP address), each warehouse has sections for different things (this is port number), if there's no section on the warehouse (no port #) then packet will be lost, thus RTO, If the port is active/open, but no one (no application/winsock) is waiting to receive any packet sent (winsock Listen method) then the packet is lost.
So firstly, you need to bind winsock to specific IP and port. IP address is simply the target machine, port is the "place" where your packet should be received.
1st Machine
Code:
'make sure there's an application at target machine that Listen on the same port
winsock.Bind LocalPort, LocalIP
Ugh, i forgot the rest... here i attach a code i develop when i was still a juvenile,young and reckless (not to mention having no live, just being a common nerd)
Btw,use it freely... i don't care much about it anymore. it's a project where i was supposed to make things work in a week <.< and as time goes by, new functions added, and suddenly bugs gathered all around. btw, i'm indonesian... so maybe some variable/comment is not in common english, Use MSDN, everything is documented there.