LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Closed Thread
  Search this Thread
Old 07-28-2009, 05:07 AM   #1
laginagesh
Member
 
Registered: Jul 2009
Posts: 42

Rep: Reputation: 16
Client - Server problem


Hi,

i have written a Client-Server application.
For new client i am creating client_sockfd

client_sockfd = accept(server_sockfd,(struct sockaddr *)&client_address,&client_len);
FD_SET(client_sockfd,&readfd);

after receiving data from client i am disconnecting the client
FD_CLR(client_sockfd,&readfd);

after disconnecting if the same client is connecting to server it is getting new client_sockfd...How to reuse the same same client_sockfd for the same client again?

for every connection and disconnection client_sockfd changing,after 1024 iterations the server is closing.

cheers
Nages
 
Old 07-28-2009, 05:11 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multithreading server-client problem naveenisback Programming 1 07-23-2009 05:48 AM
HELP - NIS server/client problem sti2envy Linux - Networking 2 09-23-2008 09:10 AM
server/client problem divukman Programming 7 04-09-2006 08:06 PM
problem with client-server himanshu Programming 2 04-21-2005 08:34 AM
Tcp/ip Client Server Problem tushar123 Programming 2 03-31-2004 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration