socket programming - accept blocking

Поиск
Список
Период
Сортировка
От Ryan
Тема socket programming - accept blocking
Дата
Msg-id loom.20041201T192605-784@post.gmane.org
обсуждение исходный текст
Список pgsql-cygwin
I am in the process of learning about socket programming.  I am creating a
simple web server that accepts a connection and provides the requested file.  I
have tested my code on a true linux machine and it works fine.  I am having
problems getting it to work properly in Cygwin.

The faulty segmet of code is:

    if ((s_curr = accept(s, (struct sockaddr *) &pin, &addrlen)) == -1)
    {
        printf("ERROR: accept\n");
    }

    printf("Connection Received\n");

The accept command does not block, so everytime I try to start up the server, I
immediately get the ERROR message.

Like I said, this code works perfectly on a true linux machine, so I was
wondering why it is not working in Cygwin.  Does anybody have any suggestions?

Thanks,

Ryan

В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Reini Urban
Дата:
Сообщение: Re: src/timezone/pgtz __imp__my_exec_path
Следующее
От: Asheesh
Дата:
Сообщение: Data Migration from version 7.2.1 to version 7.4.3