… | |
… | |
188 | s_get_cv (SV *cb_sv) |
188 | s_get_cv (SV *cb_sv) |
189 | { |
189 | { |
190 | dTHX; |
190 | dTHX; |
191 | HV *st; |
191 | HV *st; |
192 | GV *gvp; |
192 | GV *gvp; |
193 | |
193 | |
194 | return (SV *)sv_2cv (cb_sv, &st, &gvp, 0); |
194 | return (SV *)sv_2cv (cb_sv, &st, &gvp, 0); |
195 | } |
195 | } |
196 | |
196 | |
197 | static SV * |
197 | static SV * |
198 | s_get_cv_croak (SV *cb_sv) |
198 | s_get_cv_croak (SV *cb_sv) |
… | |
… | |
253 | struct sockaddr_in adr2; |
253 | struct sockaddr_in adr2; |
254 | int adr2_size = sizeof (adr2); |
254 | int adr2_size = sizeof (adr2); |
255 | SOCKET listener; |
255 | SOCKET listener; |
256 | SOCKET sock [2] = { -1, -1 }; |
256 | SOCKET sock [2] = { -1, -1 }; |
257 | |
257 | |
258 | if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) |
258 | if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) |
259 | return -1; |
259 | return -1; |
260 | |
260 | |
261 | addr.sin_family = AF_INET; |
261 | addr.sin_family = AF_INET; |
262 | addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); |
262 | addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); |
263 | addr.sin_port = 0; |
263 | addr.sin_port = 0; |
… | |
… | |
269 | goto fail; |
269 | goto fail; |
270 | |
270 | |
271 | if (listen (listener, 1)) |
271 | if (listen (listener, 1)) |
272 | goto fail; |
272 | goto fail; |
273 | |
273 | |
274 | if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) |
274 | if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) |
275 | goto fail; |
275 | goto fail; |
276 | |
276 | |
277 | if (connect (sock [0], (struct sockaddr *)&addr, addr_size)) |
277 | if (connect (sock [0], (struct sockaddr *)&addr, addr_size)) |
278 | goto fail; |
278 | goto fail; |
279 | |
279 | |