Code:
.....
if(FD_ISSET(sockfd,&myset)){
if((bytes_in=recv(sockfd,recvBuff,RECVBUFF,0)) < 0)
irc_error("myirc:recv()");
if(pong(recvBuff,sockfd))
continue;
if(bytes_in){
recvBuff[bytes_in]='\0';
if((printw("%s",recvBuff))==ERR)
irc_error("myirc:ircConnect:printw");
printw("seems ok.\n");
refresh();
}
Hi all..
Code above uses the select() call to receive a string messages from an irc server on a socket file descriptor and print it out to standard output.
you see the line if((printw("%s",recvBuff))==ERR)...
well when i run this program using stdio.h functions ,i.e using printf() it works fine and I get
the message recieved by my call to recv() sent to the screen.
But when I use the printw on the character array recvBuff I just get blank space where my text should be.???
Wot am i doing wrong?
the "printw("seems ok.\n");" call works fine!!?!
thnk you.