海外留学生Exam代考优质代考团队

留学Exam代考、online quiz、final exam、midterm、代考服务平台

微信咨询:dueessay03

化学作业代写|有机化学代考|化学Chemistry代写

  精通全类目‪作业代写‬(化学作业代写,有机化学代考,化学Chemistry代写),严格审核每一份稿件,保证原创.可以随时查询进度,免费修改至满意。7*24H作业代写咨询,跟专家1V1互动,精确匹配专业,别人做不了的我们帮你搞定,价格公道。
 
化学作业代写,有机化学代考,化学Chemistry代写
 
DRAW [x1] [y1] [x2] [y2] [colourname]
Server to client messages
WELCOME [any other data may go here]
This message is sent by the server when a new client connects to it. The welcome message may contain a string containing any number of characters including spaces. You may put whatever
welcome message you would like clients to see, and would typically include your name and any other descriptive text. The client must display this text so the user knows what server they have connected to.
LOGIN_OK
This message is sent by the server when it has received the LOGIN command from the client. It indicates that the server is now ready to accept DRAW commands from the client, and will pass on messages from other clients.
DRAWMSG [username] [x1] [y1] [x2] [y2] [colourname]
This message is sent by the server whenever a client sends a DRAW message to it. The server is responsible for working out the username of the client connected to it that generated the DRAW message, and then generating a new message which is sent to all of the clients. Note that this message is sent to all of the clients, including the client that generated it. The coordinates and colours are specified in the same way as the previous DRAW message.
ERROR [reason string]
If the server does not understand a message that the client sent to it, the server should generate an error message so that the client can print this out for debugging. This will be useful as you test your client and server against those written by others. The reason string must be a single line of text and can contain any characters including spaces - it should be descriptive enough so that the remote client programmer knows what their program has done wrong. Some example messages could be:
ERROR Cannot accept DRAW command until after LOGIN request ERROR DRAW command contains a value which is out of bounds ERROR The supplied username is already in use
After generating an ERROR message, the server should close the connection and not try to continue processing because there is an error in the protocol implementation (probably caused by the client, although this is assuming the server does not have any bugs in the code). Note that if the server fails then it may simply close the connection without any response, and the client should then terminate with an error message.
Protocol ordering
When a client connects to the server, messages will be sent back and forth in the following order. Any other order is not supported. Note that the server is not required to store drawing commands internally, so if a client joins the server later than other clients, it will miss out on any lines drawn beforehand. An ERROR message may occur at any time and after this the server automatically closes the connection. The startup sequence is as follows:
 
Command Line Arguments
Both the client and server will be controlled via command line arguments on start up. For the client, you will need to specify the Internet host name that the server is running on, the TCP port number to connect to, and the username to use. For the server, you will need to specify the port number to listen for incoming connections on. If other users are on the system you will need to pick a port number that is not currently in use. When we mark your assignment we will make sure that we use a port number which is available for use.
微信

微信客服

qq

QQ客服

QQ联系:2232468560

微信客服:dueessay03

北京市海淀区国际大厦9层

X

截屏,微信识别二维码

微信号:dueessay03

(点击微信号复制,添加好友)

微信号已复制,请打开微信添加咨询详情!
QQ号已复制,请打开QQ添加咨询详情!