Click here to Skip to main content
Rate this: bad
good
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 8:49am
douglee282
Edited 13-Sep-12 8:50am
v2
Comments
Philip Stuyck at 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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 372
1 OriginalGriff 295
2 thatraja 215
3 Emre Ataseven 155
4 Shai Vashdi 125
0 Sergey Alexandrovich Kryukov 8,849
1 OriginalGriff 5,035
2 Peter Leow 3,949
3 Maciej Los 3,535
4 Abhinav S 3,148


Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 13 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid