Ranch User Guide


Table of Contents

I. Interface
1. Introduction
1.1. Prerequisites
1.2. Supported platforms
1.3. Versioning
2. Listeners
2.1. Starting a listener
2.2. Stopping a listener
2.3. Suspending and resuming a listener
2.4. Default transport options
2.5. Listening on a random port
2.6. Listening on privileged ports
2.7. Listening on a UNIX Domain socket
2.8. Performing additional setup steps on a listening socket
2.9. Accepting connections on an existing socket
2.10. Limiting the number of concurrent connections
2.11. Customizing the number of acceptor processes
2.12. Customizing the number of connection supervisors
2.13. Setting connection count alarms
2.14. When running out of file descriptors
2.15. Using a supervisor for connection processes
2.16. Upgrading
2.17. Changing transport options
2.18. Obtaining information about listeners
3. Transports
3.1. TCP transport
3.2. SSL transport
3.3. Sending and receiving data
3.4. Sending files
3.5. Upgrading a TCP socket to SSL
3.6. Writing a transport handler
4. Protocols
4.1. Writing a protocol handler
4.2. Using gen_statem and gen_server
5. Embedded mode
5.1. Embedding
II. How to
6. Writing parsers
6.1. Parsing text
6.2. Parsing binary
7. SSL client authentication
7.1. Purpose
7.2. Obtaining client certificates
7.3. Transport configuration
7.4. Authentication
8. Connection draining
III. Advanced
9. Internals
9.1. Architecture
9.2. Number of acceptors
9.3. Platform-specific TCP features
IV. Additional information
A. Migrating from Ranch 2.1 to Ranch 2.2
A.1. Features added
A.2. Changed behaviors
A.3. Bugs fixed
B. Migrating from Ranch 2.0 to Ranch 2.1
B.1. Features added
B.2. Experimental features added
B.3. Changed behaviors
B.4. Added functions
C. Migrating from Ranch 1.7+ to Ranch 2.0
C.1. Features added
C.2. Experimental features added
C.3. Features removed
C.4. Changed behaviors
C.5. Added functions
C.6. Changed functions
C.7. Removed functions
C.8. Bugs fixed
C.9. Other changes
D. Migrating from Ranch 1.6 to 1.7
D.1. Features added
D.2. New functions
D.3. Bugs fixed
E. Migrating from Ranch 1.5 to 1.6
E.1. Features added
E.2. Experimental features added
E.3. Changed behaviors
E.4. New functions
E.5. Bugs fixed
F. Migrating from Ranch 1.x
F.1. 1.5.0
F.2. 1.4.0
F.3. 1.3.0
F.4. 1.2.1
F.5. 1.2.0
F.6. 1.1.0
F.7. 1.0.0