Go to the source code of this file.
◆ SClose()
Definition at line 9 of file SClose.c.
10{
11#ifndef NO_SIGNALS
13
14 if (sfd < 0) {
16 return (-1);
17 }
18
19 if (tlen < 1) {
20
22
23
24
26 } else {
27
28
29
31 }
32 }
33
34 if (
SSetjmp(gNetTimeoutJmp) != 0) {
35 alarm(0);
39
40
41
43 } else {
44
45
46
48 }
49 return (-1);
50 }
51
54
55 alarm((unsigned int) tlen);
56 for (;;) {
59 break;
60 }
62 break;
63 }
64 alarm(0);
66
69
70
71
73 } else {
74
75
76
78 }
79 }
81
82 return ((
errno == 0) ? 0 : (-1));
83#else
88
89 if (sfd < 0) {
91 return (-1);
92 }
93
94 if (tlen < 1) {
95
97
98
99
101 } else {
102
103
104
106 }
107 }
108
109
112
115 if (tlen <= 0) {
116
118
119
120
122 } else {
123
124
125
127 }
130 }
131
135 tv.tv_sec = tlen;
136 tv.tv_usec = 0;
139
140 break;
142
144
145
146
148 } else {
149
150
151
153 }
157
158 break;
159 }
161 }
162
163
166 if (tlen <= 0) {
167
169
170
171
173 } else {
174
175
176
178 }
181 }
182
186 tv.tv_sec = tlen;
187 tv.tv_usec = 0;
190
191 break;
193
195
196
197
199 } else {
200
201
202
204 }
208
209 break;
210 }
212 }
213
214
216#endif
217}
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
#define SELECT_TYPE_ARG234
volatile sio_sigproc_t vsio_sigproc_t
void(*)(int) SSignal(int signum, void(*handler)(int))
int SetSocketLinger(const int, const int, const int)
void(* sio_sigproc_t)(int)
INT WSAAPI shutdown(IN SOCKET s, IN INT how)
Referenced by CloseControlConnection(), CloseDataConnection(), OpenControlConnection(), and ServeOneClient().