作业帮 > 英语 > 作业

英语翻译Call this member function to accept a connection on a so

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/07 00:40:08
英语翻译
Call this member function to accept a connection on a socket.This routine extracts the first connection in the queue of pending connections,creates a new socket with the same properties as this socket,and attaches it to rConnectedSocket.If no pending connections are present on the queue,Accept returns zero and GetLastError returns an error.The accepted socket (rConnectedSocket) cannot be used to accept more connections.The original socket remains open and listening.
调用这个成员函数来接受套接字上的连接.这个程序取出挂起的连接队列里面的第一个连接,创建一个和当前套接字属性相同的新套接字,然后将其加到rConnectedSocket里.如果队列里没有任何挂起的连接,Accept会返回0并且GetLastError 会返回错误.已被接受的套接字(rConnectedSocket)不能用来接受其它的连接.最初的那个套接字依然保持开放和倾听状态.
再问: listening 是监听的意思 c# 没有socket编程? The accepted socket (rConnectedSocket) 已接受连接的的套接字不行?
再答: c#里面也有: 基于TCP协议的Socket通信,架构类似于B/S架构,一个Socket通信服务器,多个Socket通信客户端。Socket通信服务器启动时,会建立一个侦听Socket,侦听Socket将侦听到的Socket连接传给接受Socket,然后由接受Socket完成接受、发送消息,当Socket存在异常时,断开连接。 The accepted socket (rConnectedSocket) 已接受连接的的套接字,嗯,挺好。