Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining the Socket that receives the data....

Status
Not open for further replies.

RobTheMod

Programmer
Apr 20, 2001
2
US
To whomever can give me help:

I'm making a network application, and I was wondering how to find out what socket last received data...

For example, I declared an array of sockets (CASyncSockets)

CMySocket m_sSockArr[5];

and I can't find out which of these sockets received the data last...
How can I find this information...

--thanks for your time
 
Hi

One easy way to do this is to use the CSocket class that handle all the aspects of TCP/IP comm. for you.

The CSocket uses the serialization as data transfer mechanism. If you simply add the name of the computer and the name of the user to the socket message, you're on an easy way to find out who sending message.

HTH

Thierry
EMail: Thierry.Marneffe@swing.be
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top