socket connect

Socket operations on the client are as follows: 1. Create a Socket ->2. Connect ->3. Send ->4. Close.

0. Import the header file

#import "JTSocketHeader.h"
Copy the code

2. The connection

[self.mySockt connect]
Copy the code

4. Close the connection

[self.mySockt close];
Copy the code

Testing: SocketTool(www.cocoachina.com/bbs/read.ph…