|
|
@ -39,7 +39,7 @@ |
|
|
|
#include <grpc/support/sync.h> |
|
|
|
#include <grpc/support/sync.h> |
|
|
|
#include <grpc/support/atm.h> |
|
|
|
#include <grpc/support/atm.h> |
|
|
|
|
|
|
|
|
|
|
|
#include "src/core/iomgr/iomgr.h" |
|
|
|
#include "src/core/iomgr/iomgr_internal.h" |
|
|
|
|
|
|
|
|
|
|
|
/* This holds the data for an outstanding read or write on a socket.
|
|
|
|
/* This holds the data for an outstanding read or write on a socket.
|
|
|
|
The mutex to protect the concurrent access to that data is the one |
|
|
|
The mutex to protect the concurrent access to that data is the one |
|
|
@ -97,11 +97,14 @@ typedef struct grpc_winsocket { |
|
|
|
int orphan; |
|
|
|
int orphan; |
|
|
|
|
|
|
|
|
|
|
|
grpc_iomgr_closure shutdown_closure; |
|
|
|
grpc_iomgr_closure shutdown_closure; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* A label for iomgr to track outstanding objects */ |
|
|
|
|
|
|
|
grpc_iomgr_object iomgr_object; |
|
|
|
} grpc_winsocket; |
|
|
|
} grpc_winsocket; |
|
|
|
|
|
|
|
|
|
|
|
/* Create a wrapped windows handle. This takes ownership of it, meaning that
|
|
|
|
/* Create a wrapped windows handle. This takes ownership of it, meaning that
|
|
|
|
it will be responsible for closing it. */ |
|
|
|
it will be responsible for closing it. */ |
|
|
|
grpc_winsocket *grpc_winsocket_create(SOCKET socket); |
|
|
|
grpc_winsocket *grpc_winsocket_create(SOCKET socket, const char *name); |
|
|
|
|
|
|
|
|
|
|
|
/* Initiate an asynchronous shutdown of the socket. Will call off any pending
|
|
|
|
/* Initiate an asynchronous shutdown of the socket. Will call off any pending
|
|
|
|
operation to cancel them. Returns the number of callbacks that got setup. */ |
|
|
|
operation to cancel them. Returns the number of callbacks that got setup. */ |
|
|
|