1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>basic_socket</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../reference.html" title="Reference"> 9<link rel="prev" href="basic_signal_set__rebind_executor/other.html" title="basic_signal_set::rebind_executor::other"> 10<link rel="next" href="basic_socket/assign.html" title="basic_socket::assign"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 15<td align="center"><a href="../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="basic_signal_set__rebind_executor/other.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basic_socket/assign.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_asio.reference.basic_socket"></a><a class="link" href="basic_socket.html" title="basic_socket">basic_socket</a> 28</h3></div></div></div> 29<p> 30 Provides socket functionality. 31 </p> 32<pre class="programlisting">template< 33 typename <a class="link" href="Protocol.html" title="Protocol requirements">Protocol</a>, 34 typename <a class="link" href="Executor1.html" title="Executor requirements">Executor</a>> 35class basic_socket : 36 public socket_base 37</pre> 38<h5> 39<a name="boost_asio.reference.basic_socket.h0"></a> 40 <span class="phrase"><a name="boost_asio.reference.basic_socket.types"></a></span><a class="link" href="basic_socket.html#boost_asio.reference.basic_socket.types">Types</a> 41 </h5> 42<div class="informaltable"><table class="table"> 43<colgroup> 44<col> 45<col> 46</colgroup> 47<thead><tr> 48<th> 49 <p> 50 Name 51 </p> 52 </th> 53<th> 54 <p> 55 Description 56 </p> 57 </th> 58</tr></thead> 59<tbody> 60<tr> 61<td> 62 <p> 63 <a class="link" href="basic_socket__rebind_executor.html" title="basic_socket::rebind_executor"><span class="bold"><strong>rebind_executor</strong></span></a> 64 </p> 65 </td> 66<td> 67 <p> 68 Rebinds the socket type to another executor. 69 </p> 70 </td> 71</tr> 72<tr> 73<td> 74 <p> 75 <a class="link" href="basic_socket/broadcast.html" title="basic_socket::broadcast"><span class="bold"><strong>broadcast</strong></span></a> 76 </p> 77 </td> 78<td> 79 <p> 80 Socket option to permit sending of broadcast messages. 81 </p> 82 </td> 83</tr> 84<tr> 85<td> 86 <p> 87 <a class="link" href="basic_socket/bytes_readable.html" title="basic_socket::bytes_readable"><span class="bold"><strong>bytes_readable</strong></span></a> 88 </p> 89 </td> 90<td> 91 <p> 92 IO control command to get the amount of data that can be read without 93 blocking. 94 </p> 95 </td> 96</tr> 97<tr> 98<td> 99 <p> 100 <a class="link" href="basic_socket/debug.html" title="basic_socket::debug"><span class="bold"><strong>debug</strong></span></a> 101 </p> 102 </td> 103<td> 104 <p> 105 Socket option to enable socket-level debugging. 106 </p> 107 </td> 108</tr> 109<tr> 110<td> 111 <p> 112 <a class="link" href="basic_socket/do_not_route.html" title="basic_socket::do_not_route"><span class="bold"><strong>do_not_route</strong></span></a> 113 </p> 114 </td> 115<td> 116 <p> 117 Socket option to prevent routing, use local interfaces only. 118 </p> 119 </td> 120</tr> 121<tr> 122<td> 123 <p> 124 <a class="link" href="basic_socket/enable_connection_aborted.html" title="basic_socket::enable_connection_aborted"><span class="bold"><strong>enable_connection_aborted</strong></span></a> 125 </p> 126 </td> 127<td> 128 <p> 129 Socket option to report aborted connections on accept. 130 </p> 131 </td> 132</tr> 133<tr> 134<td> 135 <p> 136 <a class="link" href="basic_socket/endpoint_type.html" title="basic_socket::endpoint_type"><span class="bold"><strong>endpoint_type</strong></span></a> 137 </p> 138 </td> 139<td> 140 <p> 141 The endpoint type. 142 </p> 143 </td> 144</tr> 145<tr> 146<td> 147 <p> 148 <a class="link" href="basic_socket/executor_type.html" title="basic_socket::executor_type"><span class="bold"><strong>executor_type</strong></span></a> 149 </p> 150 </td> 151<td> 152 <p> 153 The type of the executor associated with the object. 154 </p> 155 </td> 156</tr> 157<tr> 158<td> 159 <p> 160 <a class="link" href="basic_socket/keep_alive.html" title="basic_socket::keep_alive"><span class="bold"><strong>keep_alive</strong></span></a> 161 </p> 162 </td> 163<td> 164 <p> 165 Socket option to send keep-alives. 166 </p> 167 </td> 168</tr> 169<tr> 170<td> 171 <p> 172 <a class="link" href="basic_socket/linger.html" title="basic_socket::linger"><span class="bold"><strong>linger</strong></span></a> 173 </p> 174 </td> 175<td> 176 <p> 177 Socket option to specify whether the socket lingers on close if 178 unsent data is present. 179 </p> 180 </td> 181</tr> 182<tr> 183<td> 184 <p> 185 <a class="link" href="basic_socket/lowest_layer_type.html" title="basic_socket::lowest_layer_type"><span class="bold"><strong>lowest_layer_type</strong></span></a> 186 </p> 187 </td> 188<td> 189 <p> 190 A basic_socket is always the lowest layer. 191 </p> 192 </td> 193</tr> 194<tr> 195<td> 196 <p> 197 <a class="link" href="basic_socket/message_flags.html" title="basic_socket::message_flags"><span class="bold"><strong>message_flags</strong></span></a> 198 </p> 199 </td> 200<td> 201 <p> 202 Bitmask type for flags that can be passed to send and receive operations. 203 </p> 204 </td> 205</tr> 206<tr> 207<td> 208 <p> 209 <a class="link" href="basic_socket/native_handle_type.html" title="basic_socket::native_handle_type"><span class="bold"><strong>native_handle_type</strong></span></a> 210 </p> 211 </td> 212<td> 213 <p> 214 The native representation of a socket. 215 </p> 216 </td> 217</tr> 218<tr> 219<td> 220 <p> 221 <a class="link" href="basic_socket/out_of_band_inline.html" title="basic_socket::out_of_band_inline"><span class="bold"><strong>out_of_band_inline</strong></span></a> 222 </p> 223 </td> 224<td> 225 <p> 226 Socket option for putting received out-of-band data inline. 227 </p> 228 </td> 229</tr> 230<tr> 231<td> 232 <p> 233 <a class="link" href="basic_socket/protocol_type.html" title="basic_socket::protocol_type"><span class="bold"><strong>protocol_type</strong></span></a> 234 </p> 235 </td> 236<td> 237 <p> 238 The protocol type. 239 </p> 240 </td> 241</tr> 242<tr> 243<td> 244 <p> 245 <a class="link" href="basic_socket/receive_buffer_size.html" title="basic_socket::receive_buffer_size"><span class="bold"><strong>receive_buffer_size</strong></span></a> 246 </p> 247 </td> 248<td> 249 <p> 250 Socket option for the receive buffer size of a socket. 251 </p> 252 </td> 253</tr> 254<tr> 255<td> 256 <p> 257 <a class="link" href="basic_socket/receive_low_watermark.html" title="basic_socket::receive_low_watermark"><span class="bold"><strong>receive_low_watermark</strong></span></a> 258 </p> 259 </td> 260<td> 261 <p> 262 Socket option for the receive low watermark. 263 </p> 264 </td> 265</tr> 266<tr> 267<td> 268 <p> 269 <a class="link" href="basic_socket/reuse_address.html" title="basic_socket::reuse_address"><span class="bold"><strong>reuse_address</strong></span></a> 270 </p> 271 </td> 272<td> 273 <p> 274 Socket option to allow the socket to be bound to an address that 275 is already in use. 276 </p> 277 </td> 278</tr> 279<tr> 280<td> 281 <p> 282 <a class="link" href="basic_socket/send_buffer_size.html" title="basic_socket::send_buffer_size"><span class="bold"><strong>send_buffer_size</strong></span></a> 283 </p> 284 </td> 285<td> 286 <p> 287 Socket option for the send buffer size of a socket. 288 </p> 289 </td> 290</tr> 291<tr> 292<td> 293 <p> 294 <a class="link" href="basic_socket/send_low_watermark.html" title="basic_socket::send_low_watermark"><span class="bold"><strong>send_low_watermark</strong></span></a> 295 </p> 296 </td> 297<td> 298 <p> 299 Socket option for the send low watermark. 300 </p> 301 </td> 302</tr> 303<tr> 304<td> 305 <p> 306 <a class="link" href="basic_socket/shutdown_type.html" title="basic_socket::shutdown_type"><span class="bold"><strong>shutdown_type</strong></span></a> 307 </p> 308 </td> 309<td> 310 <p> 311 Different ways a socket may be shutdown. 312 </p> 313 </td> 314</tr> 315<tr> 316<td> 317 <p> 318 <a class="link" href="basic_socket/wait_type.html" title="basic_socket::wait_type"><span class="bold"><strong>wait_type</strong></span></a> 319 </p> 320 </td> 321<td> 322 <p> 323 Wait types. 324 </p> 325 </td> 326</tr> 327</tbody> 328</table></div> 329<h5> 330<a name="boost_asio.reference.basic_socket.h1"></a> 331 <span class="phrase"><a name="boost_asio.reference.basic_socket.member_functions"></a></span><a class="link" href="basic_socket.html#boost_asio.reference.basic_socket.member_functions">Member 332 Functions</a> 333 </h5> 334<div class="informaltable"><table class="table"> 335<colgroup> 336<col> 337<col> 338</colgroup> 339<thead><tr> 340<th> 341 <p> 342 Name 343 </p> 344 </th> 345<th> 346 <p> 347 Description 348 </p> 349 </th> 350</tr></thead> 351<tbody> 352<tr> 353<td> 354 <p> 355 <a class="link" href="basic_socket/assign.html" title="basic_socket::assign"><span class="bold"><strong>assign</strong></span></a> 356 </p> 357 </td> 358<td> 359 <p> 360 Assign an existing native socket to the socket. 361 </p> 362 </td> 363</tr> 364<tr> 365<td> 366 <p> 367 <a class="link" href="basic_socket/async_connect.html" title="basic_socket::async_connect"><span class="bold"><strong>async_connect</strong></span></a> 368 </p> 369 </td> 370<td> 371 <p> 372 Start an asynchronous connect. 373 </p> 374 </td> 375</tr> 376<tr> 377<td> 378 <p> 379 <a class="link" href="basic_socket/async_wait.html" title="basic_socket::async_wait"><span class="bold"><strong>async_wait</strong></span></a> 380 </p> 381 </td> 382<td> 383 <p> 384 Asynchronously wait for the socket to become ready to read, ready 385 to write, or to have pending error conditions. 386 </p> 387 </td> 388</tr> 389<tr> 390<td> 391 <p> 392 <a class="link" href="basic_socket/at_mark.html" title="basic_socket::at_mark"><span class="bold"><strong>at_mark</strong></span></a> 393 </p> 394 </td> 395<td> 396 <p> 397 Determine whether the socket is at the out-of-band data mark. 398 </p> 399 </td> 400</tr> 401<tr> 402<td> 403 <p> 404 <a class="link" href="basic_socket/available.html" title="basic_socket::available"><span class="bold"><strong>available</strong></span></a> 405 </p> 406 </td> 407<td> 408 <p> 409 Determine the number of bytes available for reading. 410 </p> 411 </td> 412</tr> 413<tr> 414<td> 415 <p> 416 <a class="link" href="basic_socket/basic_socket.html" title="basic_socket::basic_socket"><span class="bold"><strong>basic_socket</strong></span></a> <span class="silver">[constructor]</span> 417 </p> 418 </td> 419<td> 420 <p> 421 Construct a basic_socket without opening it. <br> <span class="silver"> —</span><br> Construct 422 and open a basic_socket. <br> <span class="silver"> —</span><br> Construct a basic_socket, 423 opening it and binding it to the given local endpoint. <br> <span class="silver"> —</span> 424 <br> Construct a basic_socket on an existing native socket. 425 <br> <span class="silver"> —</span><br> Move-construct a basic_socket from another. <br> 426 <span class="silver"> —</span><br> Move-construct a basic_socket from a socket of another protocol 427 type. 428 </p> 429 </td> 430</tr> 431<tr> 432<td> 433 <p> 434 <a class="link" href="basic_socket/bind.html" title="basic_socket::bind"><span class="bold"><strong>bind</strong></span></a> 435 </p> 436 </td> 437<td> 438 <p> 439 Bind the socket to the given local endpoint. 440 </p> 441 </td> 442</tr> 443<tr> 444<td> 445 <p> 446 <a class="link" href="basic_socket/cancel.html" title="basic_socket::cancel"><span class="bold"><strong>cancel</strong></span></a> 447 </p> 448 </td> 449<td> 450 <p> 451 Cancel all asynchronous operations associated with the socket. 452 </p> 453 </td> 454</tr> 455<tr> 456<td> 457 <p> 458 <a class="link" href="basic_socket/close.html" title="basic_socket::close"><span class="bold"><strong>close</strong></span></a> 459 </p> 460 </td> 461<td> 462 <p> 463 Close the socket. 464 </p> 465 </td> 466</tr> 467<tr> 468<td> 469 <p> 470 <a class="link" href="basic_socket/connect.html" title="basic_socket::connect"><span class="bold"><strong>connect</strong></span></a> 471 </p> 472 </td> 473<td> 474 <p> 475 Connect the socket to the specified endpoint. 476 </p> 477 </td> 478</tr> 479<tr> 480<td> 481 <p> 482 <a class="link" href="basic_socket/get_executor.html" title="basic_socket::get_executor"><span class="bold"><strong>get_executor</strong></span></a> 483 </p> 484 </td> 485<td> 486 <p> 487 Get the executor associated with the object. 488 </p> 489 </td> 490</tr> 491<tr> 492<td> 493 <p> 494 <a class="link" href="basic_socket/get_option.html" title="basic_socket::get_option"><span class="bold"><strong>get_option</strong></span></a> 495 </p> 496 </td> 497<td> 498 <p> 499 Get an option from the socket. 500 </p> 501 </td> 502</tr> 503<tr> 504<td> 505 <p> 506 <a class="link" href="basic_socket/io_control.html" title="basic_socket::io_control"><span class="bold"><strong>io_control</strong></span></a> 507 </p> 508 </td> 509<td> 510 <p> 511 Perform an IO control command on the socket. 512 </p> 513 </td> 514</tr> 515<tr> 516<td> 517 <p> 518 <a class="link" href="basic_socket/is_open.html" title="basic_socket::is_open"><span class="bold"><strong>is_open</strong></span></a> 519 </p> 520 </td> 521<td> 522 <p> 523 Determine whether the socket is open. 524 </p> 525 </td> 526</tr> 527<tr> 528<td> 529 <p> 530 <a class="link" href="basic_socket/local_endpoint.html" title="basic_socket::local_endpoint"><span class="bold"><strong>local_endpoint</strong></span></a> 531 </p> 532 </td> 533<td> 534 <p> 535 Get the local endpoint of the socket. 536 </p> 537 </td> 538</tr> 539<tr> 540<td> 541 <p> 542 <a class="link" href="basic_socket/lowest_layer.html" title="basic_socket::lowest_layer"><span class="bold"><strong>lowest_layer</strong></span></a> 543 </p> 544 </td> 545<td> 546 <p> 547 Get a reference to the lowest layer. <br> <span class="silver"> —</span><br> Get a const 548 reference to the lowest layer. 549 </p> 550 </td> 551</tr> 552<tr> 553<td> 554 <p> 555 <a class="link" href="basic_socket/native_handle.html" title="basic_socket::native_handle"><span class="bold"><strong>native_handle</strong></span></a> 556 </p> 557 </td> 558<td> 559 <p> 560 Get the native socket representation. 561 </p> 562 </td> 563</tr> 564<tr> 565<td> 566 <p> 567 <a class="link" href="basic_socket/native_non_blocking.html" title="basic_socket::native_non_blocking"><span class="bold"><strong>native_non_blocking</strong></span></a> 568 </p> 569 </td> 570<td> 571 <p> 572 Gets the non-blocking mode of the native socket implementation. 573 <br> <span class="silver"> —</span><br> Sets the non-blocking mode of the native socket implementation. 574 </p> 575 </td> 576</tr> 577<tr> 578<td> 579 <p> 580 <a class="link" href="basic_socket/non_blocking.html" title="basic_socket::non_blocking"><span class="bold"><strong>non_blocking</strong></span></a> 581 </p> 582 </td> 583<td> 584 <p> 585 Gets the non-blocking mode of the socket. <br> <span class="silver"> —</span><br> Sets the 586 non-blocking mode of the socket. 587 </p> 588 </td> 589</tr> 590<tr> 591<td> 592 <p> 593 <a class="link" href="basic_socket/open.html" title="basic_socket::open"><span class="bold"><strong>open</strong></span></a> 594 </p> 595 </td> 596<td> 597 <p> 598 Open the socket using the specified protocol. 599 </p> 600 </td> 601</tr> 602<tr> 603<td> 604 <p> 605 <a class="link" href="basic_socket/operator_eq_.html" title="basic_socket::operator="><span class="bold"><strong>operator=</strong></span></a> 606 </p> 607 </td> 608<td> 609 <p> 610 Move-assign a basic_socket from another. <br> <span class="silver"> —</span><br> Move-assign 611 a basic_socket from a socket of another protocol type. 612 </p> 613 </td> 614</tr> 615<tr> 616<td> 617 <p> 618 <a class="link" href="basic_socket/release.html" title="basic_socket::release"><span class="bold"><strong>release</strong></span></a> 619 </p> 620 </td> 621<td> 622 <p> 623 Release ownership of the underlying native socket. 624 </p> 625 </td> 626</tr> 627<tr> 628<td> 629 <p> 630 <a class="link" href="basic_socket/remote_endpoint.html" title="basic_socket::remote_endpoint"><span class="bold"><strong>remote_endpoint</strong></span></a> 631 </p> 632 </td> 633<td> 634 <p> 635 Get the remote endpoint of the socket. 636 </p> 637 </td> 638</tr> 639<tr> 640<td> 641 <p> 642 <a class="link" href="basic_socket/set_option.html" title="basic_socket::set_option"><span class="bold"><strong>set_option</strong></span></a> 643 </p> 644 </td> 645<td> 646 <p> 647 Set an option on the socket. 648 </p> 649 </td> 650</tr> 651<tr> 652<td> 653 <p> 654 <a class="link" href="basic_socket/shutdown.html" title="basic_socket::shutdown"><span class="bold"><strong>shutdown</strong></span></a> 655 </p> 656 </td> 657<td> 658 <p> 659 Disable sends or receives on the socket. 660 </p> 661 </td> 662</tr> 663<tr> 664<td> 665 <p> 666 <a class="link" href="basic_socket/wait.html" title="basic_socket::wait"><span class="bold"><strong>wait</strong></span></a> 667 </p> 668 </td> 669<td> 670 <p> 671 Wait for the socket to become ready to read, ready to write, or 672 to have pending error conditions. 673 </p> 674 </td> 675</tr> 676</tbody> 677</table></div> 678<h5> 679<a name="boost_asio.reference.basic_socket.h2"></a> 680 <span class="phrase"><a name="boost_asio.reference.basic_socket.protected_member_functions"></a></span><a class="link" href="basic_socket.html#boost_asio.reference.basic_socket.protected_member_functions">Protected 681 Member Functions</a> 682 </h5> 683<div class="informaltable"><table class="table"> 684<colgroup> 685<col> 686<col> 687</colgroup> 688<thead><tr> 689<th> 690 <p> 691 Name 692 </p> 693 </th> 694<th> 695 <p> 696 Description 697 </p> 698 </th> 699</tr></thead> 700<tbody><tr> 701<td> 702 <p> 703 <a class="link" href="basic_socket/_basic_socket.html" title="basic_socket::~basic_socket"><span class="bold"><strong>~basic_socket</strong></span></a> <span class="silver">[destructor]</span> 704 </p> 705 </td> 706<td> 707 <p> 708 Protected destructor to prevent deletion through this type. 709 </p> 710 </td> 711</tr></tbody> 712</table></div> 713<h5> 714<a name="boost_asio.reference.basic_socket.h3"></a> 715 <span class="phrase"><a name="boost_asio.reference.basic_socket.data_members"></a></span><a class="link" href="basic_socket.html#boost_asio.reference.basic_socket.data_members">Data 716 Members</a> 717 </h5> 718<div class="informaltable"><table class="table"> 719<colgroup> 720<col> 721<col> 722</colgroup> 723<thead><tr> 724<th> 725 <p> 726 Name 727 </p> 728 </th> 729<th> 730 <p> 731 Description 732 </p> 733 </th> 734</tr></thead> 735<tbody> 736<tr> 737<td> 738 <p> 739 <a class="link" href="basic_socket/max_connections.html" title="basic_socket::max_connections"><span class="bold"><strong>max_connections</strong></span></a> <span class="silver">[static]</span> 740 </p> 741 </td> 742<td> 743 <p> 744 (Deprecated: Use max_listen_connections.) The maximum length of 745 the queue of pending incoming connections. 746 </p> 747 </td> 748</tr> 749<tr> 750<td> 751 <p> 752 <a class="link" href="basic_socket/max_listen_connections.html" title="basic_socket::max_listen_connections"><span class="bold"><strong>max_listen_connections</strong></span></a> <span class="silver">[static]</span> 753 </p> 754 </td> 755<td> 756 <p> 757 The maximum length of the queue of pending incoming connections. 758 </p> 759 </td> 760</tr> 761<tr> 762<td> 763 <p> 764 <a class="link" href="basic_socket/message_do_not_route.html" title="basic_socket::message_do_not_route"><span class="bold"><strong>message_do_not_route</strong></span></a> <span class="silver">[static]</span> 765 </p> 766 </td> 767<td> 768 <p> 769 Specify that the data should not be subject to routing. 770 </p> 771 </td> 772</tr> 773<tr> 774<td> 775 <p> 776 <a class="link" href="basic_socket/message_end_of_record.html" title="basic_socket::message_end_of_record"><span class="bold"><strong>message_end_of_record</strong></span></a> <span class="silver">[static]</span> 777 </p> 778 </td> 779<td> 780 <p> 781 Specifies that the data marks the end of a record. 782 </p> 783 </td> 784</tr> 785<tr> 786<td> 787 <p> 788 <a class="link" href="basic_socket/message_out_of_band.html" title="basic_socket::message_out_of_band"><span class="bold"><strong>message_out_of_band</strong></span></a> <span class="silver">[static]</span> 789 </p> 790 </td> 791<td> 792 <p> 793 Process out-of-band data. 794 </p> 795 </td> 796</tr> 797<tr> 798<td> 799 <p> 800 <a class="link" href="basic_socket/message_peek.html" title="basic_socket::message_peek"><span class="bold"><strong>message_peek</strong></span></a> <span class="silver">[static]</span> 801 </p> 802 </td> 803<td> 804 <p> 805 Peek at incoming data without removing it from the input queue. 806 </p> 807 </td> 808</tr> 809</tbody> 810</table></div> 811<p> 812 The <a class="link" href="basic_socket.html" title="basic_socket"><code class="computeroutput">basic_socket</code></a> 813 class template provides functionality that is common to both stream-oriented 814 and datagram-oriented sockets. 815 </p> 816<h5> 817<a name="boost_asio.reference.basic_socket.h4"></a> 818 <span class="phrase"><a name="boost_asio.reference.basic_socket.thread_safety"></a></span><a class="link" href="basic_socket.html#boost_asio.reference.basic_socket.thread_safety">Thread 819 Safety</a> 820 </h5> 821<p> 822 <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe. 823 </p> 824<p> 825 <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe. 826 </p> 827<h5> 828<a name="boost_asio.reference.basic_socket.h5"></a> 829 <span class="phrase"><a name="boost_asio.reference.basic_socket.requirements"></a></span><a class="link" href="basic_socket.html#boost_asio.reference.basic_socket.requirements">Requirements</a> 830 </h5> 831<p> 832 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/basic_socket.hpp</code> 833 </p> 834<p> 835 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code> 836 </p> 837</div> 838<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 839<td align="left"></td> 840<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 841 Kohlhoff<p> 842 Distributed under the Boost Software License, Version 1.0. (See accompanying 843 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 844 </p> 845</div></td> 846</tr></table> 847<hr> 848<div class="spirit-nav"> 849<a accesskey="p" href="basic_signal_set__rebind_executor/other.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basic_socket/assign.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 850</div> 851</body> 852</html> 853