struct event retry_ev; /* for retrying connects */
char *bind_address; /* address to use for binding the src */
- unsigned short bind_port; /* local port for binding the src */
+ ev_uint16_t bind_port; /* local port for binding the src */
char *address; /* address to connect to */
- unsigned short port;
+ ev_uint16_t port;
size_t max_headers_size;
ev_uint64_t max_body_size;
*/
struct evhttp_connection *
-evhttp_connection_new(const char *address, unsigned short port)
+evhttp_connection_new(const char *address, ev_uint16_t port)
{
return (evhttp_connection_base_new(NULL, NULL, address, port));
}
struct evhttp_connection *
evhttp_connection_base_bufferevent_new(struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev,
- const char *address, unsigned short port)
+ const char *address, ev_uint16_t port)
{
struct evhttp_connection *evcon = NULL;
struct evhttp_connection *
evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
- const char *address, unsigned short port)
+ const char *address, ev_uint16_t port)
{
return evhttp_connection_base_bufferevent_new(base, dnsbase, NULL, address, port);
}
*/
struct evhttp *
-evhttp_start(const char *address, unsigned short port)
+evhttp_start(const char *address, ev_uint16_t port)
{
struct evhttp *http = NULL;
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_bufferevent_new(
- struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev, const char *address, unsigned short port);
+ struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev, const char *address, ev_uint16_t port);
/**
* Return the bufferevent that an evhttp_connection is using.
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_new(
struct event_base *base, struct evdns_base *dnsbase,
- const char *address, unsigned short port);
+ const char *address, ev_uint16_t port);
/**
* Set family hint for DNS requests.
* @param port the port number on which the HTTP server should listen
* @return an struct evhttp object
*/
-struct evhttp *evhttp_start(const char *address, unsigned short port);
+struct evhttp *evhttp_start(const char *address, ev_uint16_t port);
/**
* A connection object that can be used to for making HTTP requests. The
* @deprecated It does not allow an event base to be specified
*/
struct evhttp_connection *evhttp_connection_new(
- const char *address, unsigned short port);
+ const char *address, ev_uint16_t port);
/**
* Associates an event base with the connection - can only be called
struct evhttp *http;
struct evhttp_bound_socket *handle;
- unsigned short port = 0;
+ ev_uint16_t port = 0;
#ifdef _WIN32
WSADATA WSAData;
WSAStartup(0x101, &WSAData);
int i;
int c;
int use_iocp = 0;
- unsigned short port = 8080;
+ ev_uint16_t port = 8080;
char *endptr = NULL;
#ifdef _WIN32
#endif
static evutil_socket_t
-http_connect(const char *address, unsigned short port)
+http_connect(const char *address, ev_uint16_t port)
{
/* Stupid code for connecting */
struct evutil_addrinfo ai, *aitop;