class Strum::Server::Stage

A Handshake stage.

Public Class Methods

new(socket, handshake) click to toggle source

Create a new Handshake stage with the supplied socket. @param socket [Async::IO::TCPSocket] - This Stage's socket @param handshake [Handshake] - The Handshake for this stage.

# File lib/strum/server/handshake.rb, line 53
def initialize(socket, handshake)
  self[:Socket] = socket
  self[:Handshake] = handshake
end

Public Instance Methods

execute() click to toggle source

execute the stage

# File lib/strum/server/handshake.rb, line 60
def execute
  raise Strum::Errors::NilSibling unless self[:Next]

  self[:Handshake].set_stage(self[:Next])
end
register_sibling(sibling) click to toggle source

Make this Stage aware of the next stage in the cycle. @param sibling [Stage] The sibling of this stage.

# File lib/strum/server/handshake.rb, line 69
def register_sibling(sibling)
  self[:Next] = sibling
end