Differences From Artifact [2c4b5dfd5d]:
- File
src/socket.h
— part of check-in
[81d47f4398]
at
2014-01-25 19:33:57
on branch trunk
— Move socket includes and helpers to separate files
The new file socket.h includes all headers required for sockets on the
used platform, while the file socket_helpers.h defines the BSD API
functions to the platform specific functions if necessary.This cleans up the classes dealing with sockets a lot and also reduces
code duplication. (user: js, size: 1113) [annotate] [blame] [check-ins using]
To Artifact [49c77e6e7b]:
- File src/socket.h — part of check-in [414c87ec13] at 2014-02-03 14:43:51 on branch trunk — Move socket initialization to a single place (user: js, size: 1171) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | */ #import "objfw-defs.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif #ifdef OF_HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif #ifdef _WIN32 # include <ws2tcpip.h> | > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #import "objfw-defs.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif #include <stdbool.h> #ifdef OF_HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif #ifdef _WIN32 # include <ws2tcpip.h> |
︙ | ︙ | |||
47 48 49 50 51 52 53 | uint8_t ss_len; sa_family_t ss_family; in_port_t ss_data1; struct in_addr ss_data2; int8_t ss_data3[8]; }; #endif | > > | 49 50 51 52 53 54 55 56 57 | uint8_t ss_len; sa_family_t ss_family; in_port_t ss_data1; struct in_addr ss_data2; int8_t ss_data3[8]; }; #endif extern bool of_init_sockets(void); |