|
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Socket operations. More...
#include "roc_address/socket_addr.h"#include "roc_core/stddefs.h"#include "roc_netio/io_error.h"#include "roc_netio/socket_options.h"Go to the source code of this file.
Namespaces | |
| namespace | roc |
| Root namespace. | |
| namespace | roc::netio |
| Network I/O. | |
Typedefs | |
| typedef int | roc::netio::SocketHandle |
| Platform-specific socket handle. | |
Enumerations | |
| enum | roc::netio::SocketType { roc::netio::SocketType_Tcp , roc::netio::SocketType_Udp } |
| Socket type. More... | |
Functions | |
| bool | roc::netio::socket_create (address::AddrFamily family, SocketType type, SocketHandle &new_sock) |
| Create non-blocking socket. | |
| bool | roc::netio::socket_accept (SocketHandle sock, SocketHandle &new_sock, address::SocketAddr &remote_address) |
| Accept incoming connection. | |
| bool | roc::netio::socket_setup (SocketHandle sock, const SocketOptions &options) |
| Set socket options. | |
| bool | roc::netio::socket_bind (SocketHandle sock, address::SocketAddr &local_address) |
| Bind socket to local address. | |
| bool | roc::netio::socket_listen (SocketHandle sock, size_t backlog) |
| Start listening for incoming connections. | |
| bool | roc::netio::socket_begin_connect (SocketHandle sock, const address::SocketAddr &remote_address, bool &completed_immediately) |
| Initiate connecting to remote peer. | |
| bool | roc::netio::socket_end_connect (SocketHandle sock) |
| Finish connecting to remote peer. | |
| ssize_t | roc::netio::socket_try_recv (SocketHandle sock, void *buf, size_t bufsz) |
| Try to read bytes from socket without blocking. | |
| ssize_t | roc::netio::socket_try_send (SocketHandle sock, const void *buf, size_t bufsz) |
| Try to write bytes to socket without blocking. | |
| ssize_t | roc::netio::socket_try_send_to (SocketHandle sock, const void *buf, size_t bufsz, const address::SocketAddr &remote_address) |
| Try to send datagram via socket to given address, without blocking. | |
| bool | roc::netio::socket_shutdown (SocketHandle sock) |
| Gracefully shutdown connection. | |
| bool | roc::netio::socket_close (SocketHandle sock) |
| Close socket. | |
| bool | roc::netio::socket_close_with_reset (SocketHandle sock) |
| Close socket and send reset to remote peer. Remote peer will get error when reading from connection. | |
Variables | |
| const SocketHandle | roc::netio::SocketInvalid = -1 |
| Invalid socket handle. | |
Socket operations.
Definition in file socket_ops.h.