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)
50 51 52 |
# File 'lib/dizby/protocols/tcp.rb', line 50 def apply_sockopt(soc) soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) end |
.getservername
44 45 46 47 48 |
# File 'lib/dizby/protocols/tcp.rb', line 44 def getservername Socket.gethostbyname(Socket.gethostname)[0] rescue 'localhost' end |