⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socket_listen

📁 C实现的MUD,对大家基本入门网络游戏很有帮助!
💻
字号:
     ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333))))       MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444))))        ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333))))     NNNNAAAAMMMMEEEE          socket_listen() - listen for connections on a socket     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS          #include <socket_err.h>          int socket_listen( int s, string listen_callback );     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN          To accept connections, a socket is first created with          socket_create(3), the socket is them put into listening mode          with socket_listen(3), and the connections are accepted with          socket_accept(3). The socket_listen() call applies only to          sockets of type STREAM or MUD.          The argument listen_callback is the name of a function for          the driver to call when a connection is requested on the          listening socket. The listen callback should follow this          format:               void listen_callback(int fd)          Where fd is the listening socket.     RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS          socket_listen() returns:               EESUCCESS on success.               a negative value indicated below on error.     EEEERRRRRRRROOOORRRRSSSS          EEFDRANGE      Descriptor out of range.          EEBADF         Descriptor is invalid.          EESECURITY     Security violation attempted.          EEMODENOTSUPP  Socket mode not supported.          EENOADDR       Socket not bound to an address.          EEISCONN       Socket is already connected.          EELISTEN       Problem with listen.     SSSSEEEEEEEE AAAALLLLSSSSOOOO     Page 1                                          (printed 3/16/95)     ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333))))       MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444))))        ssssoooocccckkkkeeeetttt____lllliiiisssstttteeeennnn((((3333))))          socket_accept(3), socket_connect(3), socket_create(3)     Page 2                                          (printed 3/16/95)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -