Click here to Skip to main content
15,941,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, i want to send data from the same port on which i have received the data.
for eg. i have made tcp listener using UNOLibs. so for receiving and sending is working ok. But the problem is if i receive data on port no 6666 then i need to reply from port no. 6666. i cannot find out the way to do it.

Basically i need to reply to received package with same source and destination ip on same source and destination port..
Please help.

What I have tried:

Used UNOLibs to make simple send and receive tcp data
Posted
Updated 6-Sep-17 21:07pm
Comments
Richard MacCutchan 7-Sep-17 2:59am    
Google for sockets and you will find many samples that show how to do it.

1 solution

There are plenty of articles right here on Code Project that cover this topic: TCP - CodeProject search[^] - Pick one.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900