I'm needing some ideas on how emulates the connection between client and server for exchanging packets between them.
thanks
4 replies to this topic
#1
Posted 25 October 2010 - 10:32 AM
|
|
|
#2
Posted 26 October 2010 - 05:10 AM
Let me see... I need:
Client:
Create a TCP socket
Establish connection
Communicate
Close the connection
Server:
Create a TCP socket
Assign a port to socket
Set socket to listen
Repeatedly:
-Accept new connection
-Communicate
-Close the connection
How can I create a TCP socket ? What do I need to create? How do I set up the client and server classes?
Client:
Create a TCP socket
Establish connection
Communicate
Close the connection
Server:
Create a TCP socket
Assign a port to socket
Set socket to listen
Repeatedly:
-Accept new connection
-Communicate
-Close the connection
How can I create a TCP socket ? What do I need to create? How do I set up the client and server classes?
#3
Posted 26 October 2010 - 09:05 PM
Just asking, are you using C or C++? I've been trying to the the same with C but I lost interest.

There is no problem that cannot be solved by the use of high explosives.
#4
Posted 28 October 2010 - 09:18 AM
Platform?
Windows: madwizard.org, winsock tutorial, C++ Socket class
Linux: linuxhowtos.org
Note that it's basicly the same, only on Windows you have to make like 3 extra functions calls before you start sending data over interwebz.
Windows: madwizard.org, winsock tutorial, C++ Socket class
Linux: linuxhowtos.org
Note that it's basicly the same, only on Windows you have to make like 3 extra functions calls before you start sending data over interwebz.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#5
Posted 28 October 2010 - 11:35 AM
For Linux socket programming, I would highly recommend Beej's Guide to Network Programming.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









