Annotation of parser3/src/include/pa_socks.h, revision 1.26
1.2 paf 1: /** @file
2: Parser: socks initialization/finalization decls.
1.1 paf 3:
1.24 moko 4: Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com)
1.22 moko 5: Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
1.1 paf 6: */
7:
8: #ifndef PA_SOCKS_H
9: #define PA_SOCKS_H
1.9 paf 10:
1.26 ! moko 11: #define IDENT_PA_SOCKS_H "$Id: pa_socks.h,v 1.25 2026/10/14 00:32:44 moko Exp $"
1.25 moko 12:
13: #ifdef _MSC_VER
14: #define socklen_t int
15: #else
16: #define closesocket close
17: #define INVALID_SOCKET -1
18: typedef int SOCKET;
19: #endif
1.1 paf 20:
1.15 paf 21: void pa_socks_init();
22: void pa_socks_done();
1.16 paf 23:
24: int pa_socks_errno();
25: const char* pa_socks_strerr(int no);
1.1 paf 26:
1.26 ! moko 27: /// true if the error means that the connection is reset or aborted
! 28: bool pa_socks_is_reset(int no);
! 29:
1.25 moko 30: /// waits up to timeout_ms for the socket to be ready for reading (or writing): >0 ready, 0 timeout, <0 error
31: int pa_sock_ready(SOCKET sock, bool for_write, int timeout_ms);
32:
1.1 paf 33: #endif
E-mail: