Class: Mnet::Server
- Inherits:
-
Object
- Object
- Mnet::Server
- Defined in:
- lib/mnet.rb
Overview
A TCPServer-compatible listener over the reliable UDP transport, so
OpenSSL::SSL::SSLServer.new(server, ctx) works unchanged. accept
returns a plain IO (the app end of the per-connection bridge), which the
SSL layer can wrap directly.
Instance Method Summary collapse
- #accept ⇒ Object
-
#accept_session ⇒ Object
Raw session (IO-compatible, no socketpair bridge) for the non-TLS path.
- #addr ⇒ Object
- #close ⇒ Object
- #endpoint ⇒ Object
-
#initialize(host = "0.0.0.0", port = 0, **opts) ⇒ Server
constructor
A new instance of Server.
Constructor Details
Instance Method Details
#accept ⇒ Object
1125 1126 1127 |
# File 'lib/mnet.rb', line 1125 def accept @endpoint.accept.bridge end |
#accept_session ⇒ Object
Raw session (IO-compatible, no socketpair bridge) for the non-TLS path.
1130 1131 1132 |
# File 'lib/mnet.rb', line 1130 def accept_session @endpoint.accept end |
#addr ⇒ Object
1138 1139 1140 |
# File 'lib/mnet.rb', line 1138 def addr @endpoint.local_addr end |
#close ⇒ Object
1134 1135 1136 |
# File 'lib/mnet.rb', line 1134 def close @endpoint.close end |
#endpoint ⇒ Object
1142 1143 1144 |
# File 'lib/mnet.rb', line 1142 def endpoint @endpoint end |