Pepper_56_C_interfaces
Pepper_56_C_interfaces
|
#include <ppb_tcp_server_socket_private.h>
Public Attributes | |
PP_Resource(* | Create )(PP_Instance instance) |
PP_Bool(* | IsTCPServerSocket )(PP_Resource resource) |
int32_t(* | Listen )(PP_Resource tcp_server_socket, const struct PP_NetAddress_Private *addr, int32_t backlog, struct PP_CompletionCallback callback) |
int32_t(* | Accept )(PP_Resource tcp_server_socket, PP_Resource *tcp_socket, struct PP_CompletionCallback callback) |
int32_t(* | GetLocalAddress )(PP_Resource tcp_server_socket, struct PP_NetAddress_Private *addr) |
void(* | StopListening )(PP_Resource tcp_server_socket) |
The PPB_TCPServerSocket_Private
interface provides TCP server socket operations.
int32_t(* PPB_TCPServerSocket_Private_0_2::Accept)(PP_Resource tcp_server_socket, PP_Resource *tcp_socket, struct PP_CompletionCallback callback) |
Accepts single connection, creates instance of PPB_TCPSocket_Private and stores reference to it in |tcp_socket|. |callback| is invoked when connection is accepted or in the case of failure. This method can be called only after successful Listen call on |tcp_server_socket|.
PP_Resource(* PPB_TCPServerSocket_Private_0_2::Create)(PP_Instance instance) |
Allocates a TCP server socket resource.
int32_t(* PPB_TCPServerSocket_Private_0_2::GetLocalAddress)(PP_Resource tcp_server_socket, struct PP_NetAddress_Private *addr) |
Returns the current address to which the socket is bound, in the buffer pointed to by |addr|. This method can be called only after successful Listen() call and before StopListening() call.
PP_Bool(* PPB_TCPServerSocket_Private_0_2::IsTCPServerSocket)(PP_Resource resource) |
Determines if a given resource is TCP server socket.
int32_t(* PPB_TCPServerSocket_Private_0_2::Listen)(PP_Resource tcp_server_socket, const struct PP_NetAddress_Private *addr, int32_t backlog, struct PP_CompletionCallback callback) |
Binds |tcp_server_socket| to the address given by |addr| and starts listening. The |backlog| argument defines the maximum length to which the queue of pending connections may grow. |callback| is invoked when |tcp_server_socket| is ready to accept incoming connections or in the case of failure. Returns PP_ERROR_NOSPACE if socket can't be initialized, or PP_ERROR_FAILED in the case of Listen failure. Otherwise, returns PP_OK.
void(* PPB_TCPServerSocket_Private_0_2::StopListening)(PP_Resource tcp_server_socket) |
Cancels all pending callbacks reporting PP_ERROR_ABORTED and closes the socket. Note: this method is implicitly called when server socket is destroyed.