|
-
March 5th, 2003, 07:35 AM
#1
C++ Sockets for *nix and Win Platforms
Hey all, I was trying to do some sockets programming and found what I think is a really cool site. I've already found it extremely helpful and thought I'd pass it along. 
Practical C++ Sockets provides wrapper classes for a subset of the Berkeley C Socket API for TCP and UDP sockets. It should work on both the Unix (tested under Linux, RedHat 7.3 with gcc) and Windows (tested under Win2K with Visual C++ 6.0) platforms. The purpose of this project was to develop a very simple C++ interface to sockets. In writing the code, we often chose clarity over efficiency.
Practical C++ Sockets
-
March 5th, 2003, 01:44 PM
#2
yet again, another completely useful and informative link from mathgirl32 
thanx a lot, you always seem to be interested/working on the most interesting things (1st the assembly stuff you posted now the sockets, maybe some math) - way cool... thanx again 
-take it easy?
for windows coders, i saw this bit of info in that .h Documentation...
static void cleanUp() throw(SocketException)
If WinSock, unload the WinSock DLLs; otherwise do nothing. We ignore this in our sample client code but include it in the library for completeness. If you are running on Windows and you are concerned about DLL resource consumption, call this after you are done with all Socket instances. If you execute this on Windows while some instance of Socket exists, you are toast. For portability of client code, this is an empty function on non-Windows platforms so you can always include it.
Throws:
SocketException thrown WinSock clean up fails
Parameters:
buffer - buffer to receive the data
bufferLen - maximum number of bytes to read into buffer
Returns:
number of bytes read, 0 for EOF, and -1 for error
yeah, I\'m gonna need that by friday...

-
March 5th, 2003, 05:01 PM
#3
I'm so glad you guys liked it! 
None of my c++ books cover socket programming. I had been using MS Visual help and msdn, neither of which was very helpful and I wasn't getting any good returns on my google searches until like the third time I tried. That's when I found this site. It had very straight forward documentation and heavy commenting which was exactly what I needed. Anyway, it's cool stuff and I'm glad you guys found it useful, too.
-
March 5th, 2003, 07:44 PM
#4
\x74\x68\x69\x73\x20\x69\x73\x20
\x66\x6F\x72\x20\x6D\x61\x74\x68
\x67\x69\x72\x6C\x33\x32\xD\xA
\x69\x20\x6D\x61\x64\x65\x20\x74
\x68\x65\x73\x65\x20\x61\x76\x61
\x74\x61\x72\x73\x20\x66\x6F\x72
\x20\x68\x65\x72\x20\x3B\x29
[edit]duh, that was dumb of me- i used the wrong slashes... [/edit]
yeah, I\'m gonna need that by friday...

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|