equal
deleted
inserted
replaced
18 }; |
18 }; |
19 |
19 |
20 #define SOCK_TCP_BASE(sock_ptr) (&(sock_ptr)->base) |
20 #define SOCK_TCP_BASE(sock_ptr) (&(sock_ptr)->base) |
21 |
21 |
22 /* |
22 /* |
23 * Create a new sock_tcp from the given fd, returning it as a sock_stream |
23 * Allocate a new blank sock_tcp with a correctly initialized base |
24 */ |
24 */ |
25 struct sock_stream* sock_tcp_new (int fd); |
25 struct sock_tcp* sock_tcp_alloc (void); |
|
26 |
|
27 /* |
|
28 * Initialize a blank sock_tcp with a given already-existing fd |
|
29 */ |
|
30 int sock_tcp_init_fd (struct sock_tcp *sock, int fd); |
|
31 |
|
32 /* |
|
33 * Initialize a blank sock_tcp by connecting |
|
34 */ |
|
35 int sock_tcp_init_connect (struct sock_tcp *sock, const char *hostname, const char *service); |
26 |
36 |
27 #endif /* SOCK_TCP_H */ |
37 #endif /* SOCK_TCP_H */ |