UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2002-07-26 11:23 PM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 353

Re: 4.13 - How can I read only one character at a time?

char gimme_char(int fd) {
char * buf = (char *)NULL; buf = (char *)malloc(1);
if (recv(fd, buf, 1, 0)) return ((char)*buf); }

Offline

Board footer

Powered by FluxBB