Class: Thin::Backends::TcpServer

Class Thin::Backends::TcpServer < Base

(in files lib/thin/backends/tcp_server.rb )

Backend to act as a TCP socket server.

Methods

Public Class new(host, port)

    # File lib/thin/backends/tcp_server.rb, line 8
 8:       def initialize(host, port)
 9:         @host = host
10:         @port = port
11:         super()
12:       end

Public Instance connect()

Connect the server

    # File lib/thin/backends/tcp_server.rb, line 15
15:       def connect
16:         @signature = EventMachine.start_server(@host, @port, Connection, &method(:initialize_connection))
17:       end

Public Instance disconnect()

Stops the server

    # File lib/thin/backends/tcp_server.rb, line 20
20:       def disconnect
21:         EventMachine.stop_server(@signature)
22:       end

Public Instance to_s()

    # File lib/thin/backends/tcp_server.rb, line 24
24:       def to_s
25:         "#{@host}:#{@port}"
26:       end