mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
be: replace sockaddr_storage with sockaddr_in6 for conn_address
We need only ipv6/ipv4 for connect in bufferevent, and since sockaddr_storage is pretty big (128 bytes) it will be better to use sockaddr_in6 here (it will fit ipv4 too).
This commit is contained in:
parent
2c271e24f5
commit
3889612488
@ -213,7 +213,10 @@ struct bufferevent_private {
|
|||||||
* So we need to save it, just after we connected to remote server, or
|
* So we need to save it, just after we connected to remote server, or
|
||||||
* after resolving (to avoid extra dns requests during retrying, since UDP
|
* after resolving (to avoid extra dns requests during retrying, since UDP
|
||||||
* is slow) */
|
* is slow) */
|
||||||
struct sockaddr_storage conn_address;
|
union {
|
||||||
|
struct sockaddr_in6 in6;
|
||||||
|
struct sockaddr_in in;
|
||||||
|
} conn_address;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Possible operations for a control callback. */
|
/** Possible operations for a control callback. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user