|
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
Core functionality
|
Classes | |
struct | player_connection |
Connection structure. More... | |
Defines | |
#define | PLAYER_CCLIENT_DEBUG_LEVEL_DEFAULT 5 |
Typedefs | |
typedef player_connection | player_connection_t |
Connection structure. | |
Functions | |
int | player_debug_level (int level) |
Adjust debug ouput. | |
int | player_connect (player_connection_t *conn, const char *host, const int port) |
Connect to server listening at host:port. | |
int | player_connect_host (player_connection_t *conn, const char *host, const int port) |
int | player_connect_ip (player_connection_t *conn, const struct in_addr *addr, const int port) |
Connect to server listening at addr:port. | |
int | player_connect_sockaddr (player_connection_t *conn, const struct sockaddr_in *server) |
Connect to server listening at the address specified in sockaddr. | |
int | player_disconnect (player_connection_t *conn) |
Close a connection. | |
int | player_request (player_connection_t *conn, uint16_t device, uint16_t device_index, const char *payload, size_t payloadlen, player_msghdr_t *replyhdr, char *reply, size_t replylen) |
Issue some request to the server. | |
int | player_request_device_access (player_connection_t *conn, uint16_t device, uint16_t device_index, uint8_t req_access, uint8_t *grant_access, char *driver_name, int driver_name_len) |
Issue a single device request (special case of player_request()). | |
int | player_peek (player_connection_t *conn, int timeout) |
Test to see if there is pending data on the connection. | |
int | player_read (player_connection_t *conn, player_msghdr_t *hdr, char *payload, size_t payloadlen) |
Read from the indicated connection. | |
int | player_read_tcp (player_connection_t *conn, player_msghdr_t *hdr, char *payload, size_t payloadlen) |
int | player_read_udp (player_connection_t *conn, player_msghdr_t *hdr, char *payload, size_t payloadlen) |
int | player_write (player_connection_t *conn, uint16_t device, uint16_t device_index, const char *command, size_t commandlen) |
|
|
|
Connection structure. A pointer to this structure is passed into all functions; it keeps track of connection state. |
|
Adjust debug ouput. Higher numbers are more output, 0 is none. Incidentally, it returns the current level, and if you give -1 for <level>, then the current level is unchanged. |
|
Connect to server listening at host:port. conn is filled in with relevant information, and is used in subsequent player function calls. Returns:
|
|
|
|
Connect to server listening at addr:port. conn is filled in with relevant information, and is used in subsequent player function calls. (alternative to player_connect() using binary address) Returns:
|
|
Connect to server listening at the address specified in sockaddr. conn is filled in with relevant information, and is used in subsequent player function calls. player_connect() and player_connect_ip use this function. Returns:
|
|
Close a connection. conn should be a value that was previously returned by a call to player_connect() Returns:
|
|
Issue some request to the server. requestlen is the length of the request. reply, if non-NULL, will be used to hold the reply; replylen is the size of the buffer (player_request() will not overrun your buffer) Returns:
|
|
Issue a single device request (special case of player_request()). If grant_access is non-NULL, then the actual granted access will be written there. Returns:
|
|
Test to see if there is pending data on the connection.
Checks whether there is data waiting on the connection, blocking for up to Returns:
|
|
Read from the indicated connection. Put the data in buffer, up to bufferlen. Returns:
|
|
|
|
|
|
brief Write commands to the indicated connection. Writes the data contained in command, up to commandlen. Returns:
|