Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 07-28-2009, 03:39 AM   #1
Registered: Jul 2009
Posts: 42

Rep: Reputation: 16
Exclamation Client - Server problem


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);

after receiving data from client i am disconnecting the client

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.


Last edited by laginagesh; 07-28-2009 at 05:51 AM.
Old 07-28-2009, 06:10 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to reuse DSN using session or cookies ? raiux Programming 1 08-07-2008 12:22 AM
Socket reuse ed.poore Programming 5 02-14-2007 05:42 PM
disallow password reuse cambie Linux - Security 0 11-29-2004 02:47 PM
reuse Makefile on different .c? chunlee Linux - Newbie 0 11-06-2004 08:48 PM
Cannot reuse CD-RW after first burn lansman Linux - Newbie 2 11-15-2003 04:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:50 PM.

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