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
1151 1152 1153 |
# File 'lib/mnet.rb', line 1151 def accept @endpoint.accept.bridge end |
#accept_session ⇒ Object
Raw session (IO-compatible, no socketpair bridge) for the non-TLS path.
1156 1157 1158 |
# File 'lib/mnet.rb', line 1156 def accept_session @endpoint.accept end |
#addr ⇒ Object
1164 1165 1166 |
# File 'lib/mnet.rb', line 1164 def addr @endpoint.local_addr end |
#close ⇒ Object
1160 1161 1162 |
# File 'lib/mnet.rb', line 1160 def close @endpoint.close end |
#endpoint ⇒ Object
1168 1169 1170 |
# File 'lib/mnet.rb', line 1168 def endpoint @endpoint end |