Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sockets?...Libraries!
Index -> Programming, C++ -> C++ Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Apage43




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Sun Nov 23, 2003 2:50 pm   Post subject: (No 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:

http://www.madwizard.org/view.php?page=tutorials.networking.contents&lang=cpp

and here

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2241&lngWId=3

i do bivle that some compilers also come with a verson for unix/linux.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
wtd




PostPosted: Tue Apr 06, 2004 10:04 pm   Post subject: (No 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

code:
require "socket"

$port = 12000

server = TCPServer.new($port);

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

client = TCPSocket.new("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.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: