| 838 | } |
| 839 | |
| 840 | static int |
| 841 | synserver_start(SocketServer *s) |
| 842 | { |
| 843 | TSAssert(s->magic == MAGIC_ALIVE); |
| 844 | TSAssert(s->accept_action == nullptr); |
| 845 | |
| 846 | if (s->accept_port != SYNSERVER_DUMMY_PORT) { |
| 847 | TSAssert(s->accept_port > 0); |
| 848 | TSAssert(s->accept_port < INT16_MAX); |
| 849 | |
| 850 | s->accept_action = TSNetAccept(s->accept_cont, s->accept_port, AF_INET, 0); |
| 851 | } |
| 852 | |
| 853 | return 1; |
| 854 | } |
| 855 | |
| 856 | static int |
| 857 | synserver_stop(SocketServer *s) |
no test coverage detected