readme

来自「this gives details of the network progra」· 代码 · 共 35 行

TXT
35
字号
Generic TCP clientNOTE: This code is available on the CS machines in 	~hollingd/public.html/netprog/code/generictcpThis is a client that uses the select() system call to watch twofile descriptors for intput: a tcp socket and STDIN. Anything readfrom STDIN is sent to the socket, and anything that is read from the socketis sent to STDOUT. This is an example of using select(), and is alsouseful for testing TCP servers - just make a text file that containsthe request and pipe it to this program.-----------------The client attempts to connect to the TCP indicated by the command lineparameters. The parameters are the IP address or hostnameand the port number. For example, to tell the client that the serveris running on the machine www.cs.rpi.edu port 80the client should be started like this:tcpclient www.cs.rpi.edu 80You could also put a request in a file named "req", and then do this:cat req | tcpclient www.cs.rpi.edu 80Questions should be sent to netprog@cs.rpi.edu

⌨️ 快捷键说明

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