Click here to Skip to main content
12,627,681 members (33,476 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++
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 13-Sep-12 9:49am
douglee282
Updated 13-Sep-12 9: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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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[^].
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 13 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100