Skip to content

πŸ”Œ Non-blocking TCP socket layer, with event-driven server and client.

License

Notifications You must be signed in to change notification settings

vapor-community/sockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socks

Build Status Platforms Package Managers

Twitter Czechboy0 Twitter matthiaskr1

Pure-Swift Sockets. Linux & OS X ready.

Supported socket types

TCP UDP
Client βœ… βœ…
Server βœ… βœ…

Installation

Swift Package Manager

.Package(url: "https://github.com/czechboy0/Socks.git", majorVersion: 0, minor: 3)

πŸ”§ Usage

The package provides two libraries: SocksCore and Socks.

  • SocksCore is just a Swift wrapper of the Berkeley sockets API with minimal differences. It is meant to be an easy way to use the low level API without having to deal with Swift/C interop.
  • Socks is a library providing common usecases built on top of SocksCore - a simple TCPClient, SynchronousTCPServer etc.

If you're building a HTTP server, you'll probably want to use the TCPClient, without having to worry about its implementation details. However, if you need the low-level sockets API, just import SocksCore and use that instead.

🎲 Examples

There are many working examples in this package which build as separate binaries.

πŸ“š Recommended reading

πŸ”§ Used by

  • Redbird Pure-Swift implementation of a Redis client from the original protocol spec. OS X + Linux compatible.

πŸ’™ Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

πŸ’ Contributing

Please create an issue with a description of your problem or open a pull request with a fix.

✌️ License

MIT

πŸ‘½ Authors

Honza Dvorsky - http://honzadvorsky.com, @czechboy0
Matthias Kreileder - @matthiaskr1