It depends on what you are trying to connect to. HTTP traffic is on port 80 and FTP is port 21 by standard.
You have to send traffic from the client to the server's/peer's port that it has opened to listen for traffic.
Read up on how networking works in general before trying to develop programs for it.
Bookmarks