Results 1 to 2 of 2
Hello,
I am inplementing the multiple clients and single server. In client side my inputs are
no of connections, no of tcp connectons, no of udp connections, host ip, port ...
- 06-01-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 8
client server implementation
Hello,
I am inplementing the multiple clients and single server. In client side my inputs are
no of connections, no of tcp connectons, no of udp connections, host ip, port no.
./client -socket 10 -tcp 5 -udp 5 -host 127.0.0.1 -port 11113
every thing working fine in Client side
How do I make the server to accept all these connections. Can I assign differnet port no for each connection? any inputs are highly Appreciated.
Thanks:
- 06-02-2007 #2Just Joined!
- Join Date
- Aug 2006
- Location
- india
- Posts
- 57
main()
{
open a stream socket
bind it to a port,ip
while(1)//continous to accept a client forever
{
newsocketfd = accept(clients);
spwan a thread to serve each client that makes a connect request
}
//thread which serves each client
function thread ()
{
do client request job;
}


Reply With Quote