Computer Science Canada


Author:  Apage43 [ Sat Nov 22, 2003 7:10 pm ]
Post subject:  Sockets?...Libraries!

What's a good socket library for C++?
If not cross-platform, *nix compatible, please.

Author:  Dan [ Sun Nov 23, 2003 2:50 pm ]
Post subject: 

plz post in the right fourm, moved....

any how some compilers come with a winsock libeary. but that only wroks with windows.

here is a tutoiral on it:

and here

i do bivle that some compilers also come with a verson for unix/linux.

Author:  wtd [ Tue Apr 06, 2004 10:04 pm ]
Post subject: 

This might be better done in a higher level language, too. Perl, Python, Ruby... any of those will give you socket capabilities that will work pretty much anywhere. And the code's heaven too. Smile

require "socket"

$port = 12000

server =$port);

Thread.start(server.accept) { |client|
   client.puts("hello world!")

client ="localhost", $port)
puts client.gets

A simple server (only accepts one connection) and a client in 13 lines of code that will work on *nix (Linux, BSDs, Mac OS X, Solaris, AIX, etc.) and Windows.

Anyway, just a thought.