Class: Dizby::TCProtocol
- Inherits:
-
Object
- Object
- Dizby::TCProtocol
- Includes:
- BasicProtocol
- Defined in:
- lib/dizby/protocols/tcp.rb
Defined Under Namespace
Classes: Server
Class Method Summary collapse
Methods included from BasicProtocol
Class Method Details
.apply_sockopt(soc)
46 47 48 |
# File 'lib/dizby/protocols/tcp.rb', line 46 def apply_sockopt(soc) soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) end |
.getservername
40 41 42 43 44 |
# File 'lib/dizby/protocols/tcp.rb', line 40 def getservername Socket.gethostbyname(Socket.gethostname)[0] rescue 'localhost' end |