Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
java.nio.channels

Class AsynchronousServerSocketChanne- l

  • All Implemented Interfaces:
    Closeable, AutoCloseable, AsynchronousChannel, Channel, NetworkChannel

    public abstract class AsynchronousServerSocketChannel
    extends Object
    implements AsynchronousChannel, NetworkChannel
    An asynchronous channel for stream-oriented listening sockets.

    An asynchronous server-socket channel is created by invoking the open method of this class. A newly-created asynchronous server-socket channel is open but not yet bound. It can be bound to a local address and configured to listen for connections by invoking the bind method. Once bound, the accept method is used to initiate the accepting of connections to the channel's socket. An attempt to invoke the accept method on an unbound channel will cause a NotYetBoundException to be thrown.

    Channels of this type are safe for use by multiple concurrent threads though at most one accept operation can be outstanding at any time. If a thread initiates an accept operation before a previous accept operation has completed then an AcceptPendingException will be thrown.

    Socket options are configured using the setOption method. Channels of this type support the following options:

    Option Name Description
    SO_RCVBUF The size of the socket receive buffer
    SO_REUSEADDR Re-use address

    Eerste pagina van API Java Inhoudsopgave Haut

    Additional (implementation specific) options may also be supported.

    Usage Example:

      final AsynchronousServerSocketChannel listener =
          AsynchronousServerSocketChannel.open().bind(new InetSocketAddress(5000));
    
      listener.accept(null, new CompletionHandler<AsynchronousSocketChannel,Void>() {
          public void completed(AsynchronousSocketChannel ch, Void att) {
              // accept the next connection
              listener.accept(null, this);
    
              // handle this connection
              handle(ch);
          }
          public void failed(Throwable exc, Void att) {
              ...
          }
      });
     
    Since:
    1.7

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-java/nio/channels/AsynchronousServerSocketChannel.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut