?? readme
字號:
Simple TCP client and server. The server creates a passive mode TCP socket and waits for connections(after printing out the port assigned by the operating system). Eachtime a new connection is established, the server reads whatever it canfrom the port and writes it to standard output. The server knows whenthe client is done when a 0 is returned by read() - which indicatesthe other end has closed the connection.The server also uses getsockname() to find out the IP address and port number of the client, and prints this stuff out.-----------------The client attempts to connect to the TCP indicated by the command lineparameters. The parameters are the IP address (in dotted decimal notation)and the port number. For example, to tell the client that the serveris running on the machine with IP address 128.213.1.100 and on port 2030the client should be started like this:client 128.213.1.100 2030The client code assumes that the IP address is a number, there is noattempt to lookup the address of a named computer (you can't say"foo.cse.cuhk.edu.hk"). Once the client establishes a connection it send the string"Networking Rules!!!" and then closes the connection. The clientdoes not read anything from the socket.--------------------------client1 is a client that is idential to client, but supports machinenames.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -