class EventMachine::Smsified::Server

Allows you to set up a server for incoming SMSified callbacks. @example

see examples/pong_server.rb

Public Instance Methods

post_init() click to toggle source
Calls superclass method
# File lib/em-smsified/server.rb, line 93
def post_init
  super
  no_environment_strings
end
process_http_request() click to toggle source

Does processing of incoming HTTP requests.

# File lib/em-smsified/server.rb, line 101
def process_http_request
  # the http request details are available via the following instance variables:
  #   @http_protocol
  #   @http_request_method
  #   @http_cookie
  #   @http_if_none_match
  #   @http_content_type
  #   @http_path_info
  #   @http_request_uri
  #   @http_query_string
  #   @http_post_content
  #   @http_headers
  handle(@http_request_method, @http_post_content)

  send_ok()
end

Private Instance Methods

send_ok() click to toggle source
# File lib/em-smsified/server.rb, line 119
def send_ok
  response = EM::DelegatedHttpResponse.new(self)
  response.status = 200
  response.send_response        
end