1: #line 764 "./lpsrc/flx_faio.pak"
2:
3: include "flx_faio_posix";
4: open Faio_posix;
5:
6:
7:
8:
9: print "felix posix accept/connect test\n";
10:
11: var port = 0;
12: print "creating listener\n";
13: var &listener: socket_t <- mk_listener(&port, 1);
14:
15: print "spawning connector\n";
16:
17:
18: spawn_fthread{ { var c: socket_t; connect(&c, c"127.0.0.1", port); }; };
19:
20: var s: socket_t;
21: accept (&s, listener);
22: if bad_socket s then {
23: System::exit 1;
24: } else {
25: print "accepted connection\n";
26: System::exit 0;
27: } endif;