Socket programming

xiaoxiao2021-03-06  89

The Accept () method of the ServersCokeT class returns a server-side Socket object. To ensure that the ServersCokeT class can respond to multiple clients, the Accept () method should be placed in a loop.

2. In order for the server to communicate with the client from being disturbed, put each established dialog in a thread. Consider using a class that implements the runnable interface to communicate directly with the client.

3. This class must have a constructor that can accept the Socket object generated by the server.

转载请注明原文地址:https://www.9cbs.com/read-96128.html

New Post(0)