Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename uv_platform_socket_t to uv_os_sock_t

  • Loading branch information...
commit 542eb24f3c1f18246da7538781c296667320174d 1 parent 918d23f
@piscisaureus piscisaureus authored
View
2  include/uv-private/uv-unix.h
@@ -45,7 +45,7 @@ typedef struct {
typedef int uv_file;
-typedef int uv_platform_socket_t;
+typedef int uv_os_sock_t;
#define UV_ONCE_INIT PTHREAD_ONCE_INIT
View
2  include/uv-private/uv-win.h
@@ -160,7 +160,7 @@ typedef struct uv_buf_t {
typedef int uv_file;
-typedef SOCKET uv_platform_socket_t;
+typedef SOCKET uv_os_sock_t;
typedef HANDLE uv_thread_t;
View
2  include/uv.h
@@ -975,7 +975,7 @@ UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
/* Initialize the poll watcher using a socket descriptor. On unix this is */
/* identical to uv_poll_init. On windows it takes a SOCKET handle. */
UV_EXTERN int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
- uv_platform_socket_t socket);
+ uv_os_sock_t socket);
/*
* Starts polling the file descriptor. `events` is a bitmask consisting made up
View
2  src/unix/poll.c
@@ -68,7 +68,7 @@ int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) {
int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
- uv_platform_socket_t socket) {
+ uv_os_sock_t socket) {
return uv_poll_init(loop, handle, socket);
}
View
2  src/win/poll.c
@@ -474,7 +474,7 @@ int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) {
int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
- uv_platform_socket_t socket) {
+ uv_os_sock_t socket) {
WSAPROTOCOL_INFOW protocol_info;
int len;
SOCKET peer_socket, base_socket;
View
22 test/test-poll.c
@@ -46,7 +46,7 @@ typedef enum {
typedef struct connection_context_s {
uv_poll_t poll_handle;
uv_timer_t timer_handle;
- uv_platform_socket_t sock;
+ uv_os_sock_t sock;
size_t read, sent;
int is_server_connection;
int open_handles;
@@ -56,7 +56,7 @@ typedef struct connection_context_s {
typedef struct server_context_s {
uv_poll_t poll_handle;
- uv_platform_socket_t sock;
+ uv_os_sock_t sock;
int connections;
} server_context_t;
@@ -86,7 +86,7 @@ static int got_eagain() {
}
-static void set_nonblocking(uv_platform_socket_t sock) {
+static void set_nonblocking(uv_os_sock_t sock) {
int r;
#ifdef _WIN32
unsigned long on = 1;
@@ -101,9 +101,9 @@ static void set_nonblocking(uv_platform_socket_t sock) {
}
-static uv_platform_socket_t create_nonblocking_bound_socket(
+static uv_os_sock_t create_nonblocking_bound_socket(
struct sockaddr_in bind_addr) {
- uv_platform_socket_t sock;
+ uv_os_sock_t sock;
int r;
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
@@ -131,7 +131,7 @@ static uv_platform_socket_t create_nonblocking_bound_socket(
}
-static void close_socket(uv_platform_socket_t sock) {
+static void close_socket(uv_os_sock_t sock) {
int r;
#ifdef _WIN32
r = closesocket(sock);
@@ -143,7 +143,7 @@ static void close_socket(uv_platform_socket_t sock) {
static connection_context_t* create_connection_context(
- uv_platform_socket_t sock, int is_server_connection) {
+ uv_os_sock_t sock, int is_server_connection) {
int r;
connection_context_t* context;
@@ -433,7 +433,7 @@ static void delay_timer_cb(uv_timer_t* timer, int status) {
static server_context_t* create_server_context(
- uv_platform_socket_t sock) {
+ uv_os_sock_t sock) {
int r;
server_context_t* context;
@@ -468,7 +468,7 @@ static void server_poll_cb(uv_poll_t* handle, int status, int events) {
connection_context_t* connection_context;
struct sockaddr_in addr;
socklen_t addr_len;
- uv_platform_socket_t sock;
+ uv_os_sock_t sock;
int r;
addr_len = sizeof addr;
@@ -496,7 +496,7 @@ static void server_poll_cb(uv_poll_t* handle, int status, int events) {
static void start_server() {
- uv_platform_socket_t sock;
+ uv_os_sock_t sock;
server_context_t* context;
int r;
@@ -512,7 +512,7 @@ static void start_server() {
static void start_client() {
- uv_platform_socket_t sock;
+ uv_os_sock_t sock;
connection_context_t* context;
struct sockaddr_in server_addr = uv_ip4_addr("127.0.0.1", TEST_PORT);
int r;
Please sign in to comment.
Something went wrong with that request. Please try again.