Skip to content

iwufan/SocketClientDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SocketClientDemo

This is a client-side socket demo built by CocoaAsyncSocket framework written in Swift4. You can download and run it directly.

Usage

image

1. Input the IP address of the server.

2. Input the port of the server.

3. Click "开始连接".

After the server is connected with a client successfully, it can send messages to the client and receive messages from the client.

Error

I you occur the error "No such module 'CocoaAsyncSocket'" as below.

image

You should know the project can run normally even this error exists.

Here are the methods to solve this error.

First, you should check whether you have installed CocaAsyncSocket framework through cocoapods. If you have CocaAsyncSocket framework in you project, the solution will be very simple, just delete the words 'import CocaAsyncSocket' and type them again. Build the project and the error will disappear.

Other

It's just a basic version. I will add more functions in future, like send images or musics to the server.

Enjoy, thanks.

About

Socket client-side built by CocoaAsyncSocket framework written in Swift4.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published