Class: EPP::OldServer

Inherits:
Server
  • Object
show all
Defined in:
lib/epp-client/old_server.rb

Overview

Handles sending and receiving data to older EPP servers.

These servers transmit the payload with CRLF at the end and recieve one byte at a time until EOF is reached.

Constant Summary

Constants inherited from Server

Server::DEFAULTS, Server::HEADER_LEN

Instance Attribute Summary

Attributes inherited from Server

#DEFAULT_SERVICES

Instance Method Summary collapse

Methods inherited from Server

#connection, const_missing, #greeting, #hello, #initialize, #last_error, #last_request, #last_response, #options, #prepare_request, #request, #with_login

Constructor Details

This class inherits a constructor from EPP::Server

Instance Method Details

#recv_frameString

Receives frame using old method

Returns:

  • (String)

    XML Payload response



17
18
19
20
21
22
23
# File 'lib/epp-client/old_server.rb', line 17

def recv_frame
  data = ''
  until @sock.eof?
    data << @sock.read(1)
  end
  data
end

#send_frame(xml) ⇒ Object

Sends frame using old method

Parameters:

  • xml (String)

    XML payload to send



10
11
12
# File 'lib/epp-client/old_server.rb', line 10

def send_frame(xml)
  @sock.write(xml + "\r\n")
end