Pepper_47_C_interfaces
Public Attributes | List of all members
PPB_TCPServerSocket_Private_0_2 Struct Reference

#include <ppb_tcp_server_socket_private.h>

Collaboration diagram for PPB_TCPServerSocket_Private_0_2:
Collaboration graph

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)
 

Detailed Description

The PPB_TCPServerSocket_Private interface provides TCP server socket operations.

Definition at line 42 of file ppb_tcp_server_socket_private.h.

Member Data Documentation

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|.

Definition at line 72 of file ppb_tcp_server_socket_private.h.

PP_Resource(* PPB_TCPServerSocket_Private_0_2::Create)(PP_Instance instance)

Allocates a TCP server socket resource.

Definition at line 46 of file ppb_tcp_server_socket_private.h.

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.

Definition at line 80 of file ppb_tcp_server_socket_private.h.

PP_Bool(* PPB_TCPServerSocket_Private_0_2::IsTCPServerSocket)(PP_Resource resource)

Determines if a given resource is TCP server socket.

Definition at line 50 of file ppb_tcp_server_socket_private.h.

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.

Definition at line 61 of file ppb_tcp_server_socket_private.h.

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.

Definition at line 87 of file ppb_tcp_server_socket_private.h.


The documentation for this struct was generated from the following file: