|
|
| version 1.1, 2001/04/07 14:23:34 | version 1.12, 2002/02/08 07:27:48 |
|---|---|
| Line 1 | Line 1 |
| /* | /** @file |
| Parser: socks initialization/finalization. | Parser: socks initialization/finalization. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru) | |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | |
| $Id$ | $Id$ |
| */ | */ |
| #ifdef WIN32 | #define NO_UNISTD_H |
| #include <winsock.h> | #include "pa_config_includes.h" |
| #else | |
| //#include <netinet/tcp.h> | |
| //#include <arpa/nameser.h> | |
| //#include <netdb.h> | |
| //#include <signal.h> | |
| #endif | |
| #include "pa_socks.h" | #ifndef HAVE_SYS_SELECT_H |
| #include "pa_exception.h" | #include "pa_exception.h" |
| #include "pa_socks.h" | |
| #include <winsock.h> | |
| /* ************************ Common stuff *********************** */ | |
| #ifdef WIN32 | |
| WSADATA wsaData; | WSADATA wsaData; |
| Line 36 void init_socks(Pool& pool) { | Line 27 void init_socks(Pool& pool) { |
| if ( err != 0 ) { | if ( err != 0 ) { |
| /* Tell the user that we could not find a usable */ | /* Tell the user that we could not find a usable */ |
| /* WinSock DLL. */ | /* WinSock DLL. */ |
| PTHROW(0, 0, | throw Exception(0, 0, |
| 0, | 0, |
| "can not WSAStartup, err=%d", | "can not WSAStartup, err=%d", |
| err); | err); |
| Line 58 void done_socks() { | Line 49 void done_socks() { |
| #else | #else |
| #include "pa_pool.h" | |
| void init_socks(Pool& pool) {} | void init_socks(Pool& pool) {} |
| void done_socks() {} | void done_socks() {} |