This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Socket question


	I ported a few programs I wrote for bsdi, which 
compiled flawlessly.  When run, the programs are able to 
create the socket, and connect, however data read in from 
the remote host, does not appear to be read in properly.

The programs run properly in unix, but not when compiled
for windows, i include a bit of the source so maybe someone
out there can help.  In readline, i have the program log
the incoming data, in UNIX, it logs the actual input, in
winnt, it turns out to be blank lines logged instead....


----------- begin bit of source ------------
                switch (select(NFDBITS, &fdvar, (fd_set *) 0,
                (fd_set *) 0, &timeout)) {
                        parse_data(&fdvar);
                        break;

---- and parse_data -----

void
parse_data(fd_set * read_fds)
{
        if (FD_ISSET(socketfd, read_fds))
                if (readline() > 0) {
                        parse(L);
                } else
                        close(socketfd);
}
----------- end source -------------


Thanks for any help given.

-jas
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]