| | |
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."
•
•
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 based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node output parameter pointer problem program programming project proxy python read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






