LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2006, 09:38 PM   #16
nickraj
LQ Newbie
 
Registered: Sep 2006
Location: usa
Posts: 25

Original Poster
Rep: Reputation: 15

Well thanks all ,I haved fixed the bug . Actuall the code at the server was a little wrong
Code:
        
         for(i=0;i<5;i++)
             {
                   if(nclient[i]>0&&FD_ISSET(nclient[i],&rset)>0)
                        {
                            printf("client[%d] is =%d\n",i,nclient[i]);
                             read(nclient[i],buf,sizeof(buf));
                             printf("msg from client[%d]=%s",i,buf);
                             write(nclient[i],buf,sizeof(buf));
                                }
              }
 
Old 04-24-2008, 10:02 PM   #17
lrios
Member
 
Registered: Mar 2008
Location: Arg
Distribution: Cent0S
Posts: 48

Rep: Reputation: 15
Post bzero() and fflush() functions

use bzero() and fflush() before call read

Last edited by lrios; 04-25-2008 at 08:46 AM.
 
  


Reply



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
C socket programming Help! qinglau Programming 5 05-03-2006 09:26 AM
Socket Programming jawadhashmi Programming 4 05-24-2005 03:04 AM
Help me ... about Socket programming.. rajsun Programming 2 04-24-2005 04:50 PM
Socket programming maldini1010 Programming 4 02-11-2005 11:16 PM
Socket Programming cxel91a Programming 4 03-19-2003 10:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:50 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