Displaying 1 result from an estimated 1 matches for "bladiebla".
2000 Apr 22
0
meta socket
oi (ok now in english just in case),
How about using fdopen() on the meta socket, so you can use constructions
like this on the socket:
file=fdopen(fd,"r+");
...
fgets(buf,BUFSIZE,file);
sscanf(buf,"%bladiebla",&variables);
(fscanf seeks and that's not nice on sockets, so that's why this.)
This seems a lot easier to me than read() calls with the assumption that
every single read() contains only one request. And replies are a lot
easier to do this way too, just fprintf(file,"%bladi...