1sock_open(3z) z88dk Programmer's Manual sock_open(3z)
2
3
4
6 sock_open - open an active network connection
7
9 #include <net/socket.h>
10
11 SOCKET *sock_open(ipaddr_t ipdest, tcpport_t dport,
12 void (*handler)(), char proto);
13
15 The sock_open() function creates a socket descriptor and attempts to
16 establish a connection to the port dport on the host ipdest using the
17 protocol proto. At the moment only protocols prot_UDP and prot_TCP are
18 supported.
19
20 The parameter handler specifies a handler to be called whenever the
21 connection changes state or new data arrives. It is of archaic interest
22 only.
23
24
26 sock_open() returns a socket descriptor. Specifying a non-supported
27 protocol will result in the carry flag being set and the return value
28 being EPROTONOSUPPORT.
29
30
32 sock_listen(3z)
33
34
36 Dominic Morris <dom@jb.man.ac.uk>
37
38
39
40
41 18 February 2000 sock_open(3z)