| | |
UNIX Socket read/write functions
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Is there any way to read or write to a socket besides using the
read() and write() functions. Is there any way to treat it like a stream and use the insertion/extraction operators (<< and >>)? The reason I ask is because with read I have to put an arbitrary size on the message to be read, but that can vary. >Is there any way to read or write to a socket besides using the read() and write() functions.
http://www.hmug.org/man/2/send.php
http://www.hmug.org/man/2/recv.php
>Is there any way to treat it like a stream and use the insertion/extraction operators (<< and >>)?
You'll need a C++ wrapper library. I don't know any off the top of my head.
http://www.hmug.org/man/2/send.php
http://www.hmug.org/man/2/recv.php
>Is there any way to treat it like a stream and use the insertion/extraction operators (<< and >>)?
You'll need a C++ wrapper library. I don't know any off the top of my head.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
•
•
Join Date: Dec 2006
Posts: 1,089
Reputation:
Solved Threads: 164
socket++ is a library that i have used. it works resonably well. it has a distinct c++ feel about it;
sockets in the library have the same interface as the streams in the iostream library. here is the link:
http://www.linuxhacker.at/socketxx
sockets in the library have the same interface as the streams in the iostream library. here is the link:
http://www.linuxhacker.at/socketxx
Last edited by vijayan121; Apr 10th, 2007 at 11:31 am. Reason: change url to a better one
![]() |
Similar Threads
- Image read and write operations in turbo C (C)
- Question about file read/write (Java)
- XP SP2 installation error: "unable to read from or write to the database" (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: C++ Operating System
- Next Thread: Functions
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamic email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






