• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

/usr/lib/swipl/library/ext/clib/socket.pl
All Application Manual Name SummaryHelp

  • ext
    • clib
      • socket.pl -- Network socket (TCP and UDP) library
        • socket_create/2
        • tcp_socket/1
        • unix_domain_socket/1
        • tcp_close_socket/1
        • tcp_open_socket/2
      • uid.pl -- User and group management on Unix systems
      • unix.pl -- Unix specific operations
      • syslog.pl -- Unix syslog interface
      • filesex.pl -- Extended operations on files
      • uri.pl -- Process URIs
      • process.pl -- Create processes and redirect I/O
      • time.pl -- Time and alarm library
      • sha.pl -- SHA secure hashes
      • crypt.pl
      • memfile.pl
      • uuid.pl -- Universally Unique Identifier (UUID) Library
      • hash_stream.pl -- Maintain a hash on a stream
      • md5.pl -- MD5 hashes
      • streampool.pl -- Input multiplexing
      • cgi.pl -- Read CGI parameters
      • udp_broadcast.pl -- A UDP broadcast proxy
      • prolog_stream.pl -- A stream with Prolog callbacks
      • rlimit.pl
 tcp_close_socket(+SocketId) is det
Closes the indicated socket, making SocketId invalid. Normally, sockets are closed by closing both stream handles returned by open_socket/3. There are two cases where tcp_close_socket/1 is used because there are no stream-handles:
  • If, after tcp_accept/3, the server uses fork/1 to handle the client in a sub-process. In this case the accepted socket is not longer needed from the main server and must be discarded using tcp_close_socket/1.
  • If, after discovering the connecting client with tcp_accept/3, the server does not want to accept the connection, it should discard the accepted socket immediately using tcp_close_socket/1.
ClioPatria (version V3.1.1-51-ga0b30a5)