Click here to Skip to main content
15,887,822 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have C++ classes for sockets: one class is for transmit and the other is for receive. I need to create a socket with which I can transmit and receive. Does anyone have such a class? Or some sort of implementation that provides this capability.
Posted
Updated 13-Sep-12 8:50am
v2
Comments
Philip Stuyck 13-Sep-12 15:03pm    
What do you mean ?
First you say : I have C++ classes for sockets.
Then you ask if anyone has such a class ?
Answer is: you have.
It is not that difficult to create a class wrapper around a socket.

If you need to create a socket that is supposed to send over a specific port and not an ephemeral port, you need to bind the socket before sending.
I am answering the title here because the text does not make sense to me.
 
Share this answer
 
You should create the sockets in your classes.
If you're are developing for the Windows platform then have a look at the code samples provided by MSDN[^].
 
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