|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sflsock.h"
sock_t
passive_TCP (
const char *service, /* Service name or port as string */
int queue_length /* Queue length for listen() */
)
Creates a passive bound TCP socket for the specified service. Returns socket number or INVALID_SOCKET. If it returns INVALID_SOCKET, you can get the reason for the error by calling connect error (). This may be one of:
| IP NOSOCKETS | Sockets not supported on this system |
| IP BADSERVICE | Service cannot be converted to port number |
| IP BADPROTOCOL | Cannot understand protocol name |
| IP SOCKETERROR | Cannot create the passive socket |
| IP BINDERROR | Cannot bind to the port |
| IP LISTENERROR | Cannot listen to port |
{
ASSERT (service && *service);
ASSERT (queue_length > 0);
return (passive socket (service, "tcp", queue_length));
}
| | << | < | > | >> |
|