• Home
  • Raw
  • Download

Lines Matching full:socket

28 /// Provides socket functionality.
44 /// socket.
47 /// The native representation of a socket.
61 * This constructor creates a socket without opening it.
63 * @param io_service The io_service object that the socket will use to
64 * dispatch handlers for any asynchronous operations performed on the socket.
73 * This constructor creates and opens a socket.
75 * @param io_service The io_service object that the socket will use to
76 * dispatch handlers for any asynchronous operations performed on the socket.
94 * This constructor creates a socket and automatically opens it bound to the
98 * @param io_service The io_service object that the socket will use to
99 * dispatch handlers for any asynchronous operations performed on the socket.
101 * @param endpoint An endpoint on the local machine to which the socket will
118 /// Construct a basic_socket on an existing native socket.
120 * This constructor creates a socket object to hold an existing native socket.
122 * @param io_service The io_service object that the socket will use to
123 * dispatch handlers for any asynchronous operations performed on the socket.
127 * @param native_socket A native socket.
143 * This constructor moves a socket from one object to another.
159 * This assignment operator moves a socket from one object to another.
178 /// Move-construct a basic_socket from a socket of another protocol type.
180 * This constructor moves a socket from one object to another.
197 /// Move-assign a basic_socket from a socket of another protocol type.
199 * This assignment operator moves a socket from one object to another.
247 /// Open the socket using the specified protocol.
249 * This function opens the socket so that it will use the specified protocol.
257 * asio::ip::tcp::socket socket(io_service);
258 * socket.open(asio::ip::tcp::v4());
268 /// Open the socket using the specified protocol.
270 * This function opens the socket so that it will use the specified protocol.
278 * asio::ip::tcp::socket socket(io_service);
280 * socket.open(asio::ip::tcp::v4(), ec);
293 /// Assign an existing native socket to the socket.
295 * This function opens the socket to hold an existing native socket.
299 * @param native_socket A native socket.
312 /// Assign an existing native socket to the socket.
314 * This function opens the socket to hold an existing native socket.
318 * @param native_socket A native socket.
329 /// Determine whether the socket is open.
335 /// Close the socket.
337 * This function is used to close the socket. Any asynchronous send, receive
345 * connected socket, call shutdown() before closing the socket.
354 /// Close the socket.
356 * This function is used to close the socket. Any asynchronous send, receive
365 * asio::ip::tcp::socket socket(io_service);
368 * socket.close(ec);
376 * connected socket, call shutdown() before closing the socket.
383 /// (Deprecated: Use native_handle().) Get the native socket representation.
386 * socket. This is intended to allow access to native socket functionality
394 /// Get the native socket representation.
397 * socket. This is intended to allow access to native socket functionality
405 /// Cancel all asynchronous operations associated with the socket.
433 * operations and close the socket.
446 /// Cancel all asynchronous operations associated with the socket.
474 * operations and close the socket.
485 /// Determine whether the socket is at the out-of-band data mark.
487 * This function is used to check whether the socket input is currently
490 * @return A bool indicating whether the socket is at the out-of-band data
503 /// Determine whether the socket is at the out-of-band data mark.
505 * This function is used to check whether the socket input is currently
510 * @return A bool indicating whether the socket is at the out-of-band data
552 /// Bind the socket to the given local endpoint.
554 * This function binds the socket to the specified endpoint on the local
557 * @param endpoint An endpoint on the local machine to which the socket will
564 * asio::ip::tcp::socket socket(io_service);
565 * socket.open(asio::ip::tcp::v4());
566 * socket.bind(asio::ip::tcp::endpoint(
577 /// Bind the socket to the given local endpoint.
579 * This function binds the socket to the specified endpoint on the local
582 * @param endpoint An endpoint on the local machine to which the socket will
589 * asio::ip::tcp::socket socket(io_service);
590 * socket.open(asio::ip::tcp::v4());
592 * socket.bind(asio::ip::tcp::endpoint(
606 /// Connect the socket to the specified endpoint.
608 * This function is used to connect a socket to the specified remote endpoint.
612 * The socket is automatically opened if it is not already open. If the
613 * connect fails, and the socket was automatically opened, the socket is
616 * @param peer_endpoint The remote endpoint to which the socket will be
623 * asio::ip::tcp::socket socket(io_service);
626 * socket.connect(endpoint);
642 /// Connect the socket to the specified endpoint.
644 * This function is used to connect a socket to the specified remote endpoint.
648 * The socket is automatically opened if it is not already open. If the
649 * connect fails, and the socket was automatically opened, the socket is
652 * @param peer_endpoint The remote endpoint to which the socket will be
659 * asio::ip::tcp::socket socket(io_service);
663 * socket.connect(endpoint, ec);
688 * This function is used to asynchronously connect a socket to the specified
691 * The socket is automatically opened if it is not already open. If the
692 * connect fails, and the socket was automatically opened, the socket is
695 * @param peer_endpoint The remote endpoint to which the socket will be
721 * asio::ip::tcp::socket socket(io_service);
724 * socket.async_connect(endpoint, connect_handler);
761 /// Set an option on the socket.
763 * This function is used to set an option on the socket.
765 * @param option The new option value to be set on the socket.
789 * asio::ip::tcp::socket socket(io_service);
792 * socket.set_option(option);
803 /// Set an option on the socket.
805 * This function is used to set an option on the socket.
807 * @param option The new option value to be set on the socket.
831 * asio::ip::tcp::socket socket(io_service);
835 * socket.set_option(option, ec);
850 /// Get an option from the socket.
852 * This function is used to get the current value of an option on the socket.
854 * @param option The option value to be obtained from the socket.
878 * asio::ip::tcp::socket socket(io_service);
880 * asio::ip::tcp::socket::keep_alive option;
881 * socket.get_option(option);
893 /// Get an option from the socket.
895 * This function is used to get the current value of an option on the socket.
897 * @param option The option value to be obtained from the socket.
921 * asio::ip::tcp::socket socket(io_service);
923 * asio::ip::tcp::socket::keep_alive option;
925 * socket.get_option(option, ec);
941 /// Perform an IO control command on the socket.
943 * This function is used to execute an IO control command on the socket.
945 * @param command The IO control command to be performed on the socket.
956 * asio::ip::tcp::socket socket(io_service);
958 * asio::ip::tcp::socket::bytes_readable command;
959 * socket.io_control(command);
971 /// Perform an IO control command on the socket.
973 * This function is used to execute an IO control command on the socket.
975 * @param command The IO control command to be performed on the socket.
986 * asio::ip::tcp::socket socket(io_service);
988 * asio::ip::tcp::socket::bytes_readable command;
990 * socket.io_control(command, ec);
1006 /// Gets the non-blocking mode of the socket.
1008 * @returns @c true if the socket's synchronous operations will fail with
1022 /// Sets the non-blocking mode of the socket.
1024 * @param mode If @c true, the socket's synchronous operations will fail with
1042 /// Sets the non-blocking mode of the socket.
1044 * @param mode If @c true, the socket's synchronous operations will fail with
1062 /// Gets the non-blocking mode of the native socket implementation.
1065 * native socket. This mode has no effect on the behaviour of the socket
1068 * @returns @c true if the underlying socket is in non-blocking mode and
1072 * @note The current non-blocking mode is cached by the socket object.
1074 * was set directly on the native socket.
1079 * transparent to the user of the socket object. The following example
1084 * tcp::socket& sock_;
1094 * // Put the underlying socket into non-blocking mode.
1118 * // We have to wait for the socket to become ready again.
1140 * void async_sendfile(tcp::socket& sock, int fd, Handler h)
1151 /// Sets the non-blocking mode of the native socket implementation.
1154 * native socket. It has no effect on the behaviour of the socket object's
1157 * @param mode If @c true, the underlying socket is put into non-blocking
1169 * transparent to the user of the socket object. The following example
1174 * tcp::socket& sock_;
1184 * // Put the underlying socket into non-blocking mode.
1208 * // We have to wait for the socket to become ready again.
1230 * void async_sendfile(tcp::socket& sock, int fd, Handler h)
1244 /// Sets the non-blocking mode of the native socket implementation.
1247 * native socket. It has no effect on the behaviour of the socket object's
1250 * @param mode If @c true, the underlying socket is put into non-blocking
1262 * transparent to the user of the socket object. The following example
1267 * tcp::socket& sock_;
1277 * // Put the underlying socket into non-blocking mode.
1301 * // We have to wait for the socket to become ready again.
1323 * void async_sendfile(tcp::socket& sock, int fd, Handler h)
1336 /// Get the local endpoint of the socket.
1338 * This function is used to obtain the locally bound endpoint of the socket.
1340 * @returns An object that represents the local endpoint of the socket.
1346 * asio::ip::tcp::socket socket(io_service);
1348 * asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
1360 /// Get the local endpoint of the socket.
1362 * This function is used to obtain the locally bound endpoint of the socket.
1366 * @returns An object that represents the local endpoint of the socket.
1371 * asio::ip::tcp::socket socket(io_service);
1374 * asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
1386 /// Get the remote endpoint of the socket.
1388 * This function is used to obtain the remote endpoint of the socket.
1390 * @returns An object that represents the remote endpoint of the socket.
1396 * asio::ip::tcp::socket socket(io_service);
1398 * asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
1410 /// Get the remote endpoint of the socket.
1412 * This function is used to obtain the remote endpoint of the socket.
1416 * @returns An object that represents the remote endpoint of the socket.
1421 * asio::ip::tcp::socket socket(io_service);
1424 * asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
1436 /// Disable sends or receives on the socket.
1446 * Shutting down the send side of the socket:
1448 * asio::ip::tcp::socket socket(io_service);
1450 * socket.shutdown(asio::ip::tcp::socket::shutdown_send);
1460 /// Disable sends or receives on the socket.
1470 * Shutting down the send side of the socket:
1472 * asio::ip::tcp::socket socket(io_service);
1475 * socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);