As you can see, the output stream is parameterized: you can send some logs to a file and others to a network socket.
可以看出,输出流是参数化的:您可以把一些日志记录放在文件中,其他的送往网络套接字。
The architectural diagram below in Figure 3 shows how the client and server applications have access to a socket that has an input and an output stream.
图3中的架构图显示了客户端和服务器应用程序如何访问具有输入和输出流的套接字。
The output stream of the socket becomes the input stream to the server application and vice-versa.
套接字的输出流将成为服务器应用程序的输入流,反之亦然。
Returns an input stream for this socket.
返回此套接字的输入流。
Returns an output stream for this socket.
返回此套接字的输出流。
Creates either a stream or a datagram socket.
创建数据流或数据报套接字。
SOCK_SEQPACKET socket is just like a SOCK_STREAM socket except that we get a message-based service instead of a byte-stream service.
套接口sock_seqpacket类似于SOCK_STREAM套接口,不同的是我们得到的是一个基于消息的服务,而不是一个字节流服务。
SOCK_SEQPACKET socket is just like a SOCK_STREAM socket except that we get a message-based service instead of a byte-stream service.
套接口sock_seqpacket类似于SOCK_STREAM套接口,不同的是我们得到的是一个基于消息的服务,而不是一个字节流服务。
应用推荐