Class: ZMachine::Connection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/zmachine/connection.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Connection

Returns a new instance of Connection.



19
20
# File 'lib/zmachine/connection.rb', line 19

def initialize(*args, &block)
end

Instance Attribute Details

#channelObject

Returns the value of attribute channel.



4
5
6
# File 'lib/zmachine/connection.rb', line 4

def channel
  @channel
end

Class Method Details

.new(channel, *args, &block) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/zmachine/connection.rb', line 10

def self.new(channel, *args, &block)
  allocate.instance_eval do
    @channel = channel
    initialize(*args, &block)
    post_init
    self
  end
end

Instance Method Details

#close_connection_after_writingObject



40
41
42
# File 'lib/zmachine/connection.rb', line 40

def close_connection_after_writing
  close_connection(true)
end

#comm_inactivity_timeoutObject



44
45
# File 'lib/zmachine/connection.rb', line 44

def comm_inactivity_timeout
end

#comm_inactivity_timeout=(value) ⇒ Object Also known as: set_comm_inactivity_timeout



47
48
# File 'lib/zmachine/connection.rb', line 47

def comm_inactivity_timeout=(value)
end

#connection_completedObject



27
28
# File 'lib/zmachine/connection.rb', line 27

def connection_completed
end

#detachObject



52
53
54
# File 'lib/zmachine/connection.rb', line 52

def detach
  _not_implemented
end

#error?Boolean

Returns:

  • (Boolean)


56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/zmachine/connection.rb', line 56

def error?
  errno = ZMachine::report_connection_error_status(@signature)
  case errno
  when 0
    false
  when -1
    true
  else
    Errno::constants.select do |name|
      Errno.__send__(:const_get, name)::Errno == errno
    end.first
  end
end

#get_idle_timeObject



70
71
72
# File 'lib/zmachine/connection.rb', line 70

def get_idle_time
  _not_implemented
end

#get_peer_certObject



74
75
76
# File 'lib/zmachine/connection.rb', line 74

def get_peer_cert
  _not_implemented
end

#get_peernameObject



78
79
80
81
82
# File 'lib/zmachine/connection.rb', line 78

def get_peername
  if peer = @channel.peer_name
    ::Socket.pack_sockaddr_in(*peer)
  end
end

#get_pidObject



84
85
86
# File 'lib/zmachine/connection.rb', line 84

def get_pid
  _not_implemented
end

#get_proxied_bytesObject



88
89
90
# File 'lib/zmachine/connection.rb', line 88

def get_proxied_bytes
  _not_implemented
end

#get_socknameObject



94
95
96
97
98
# File 'lib/zmachine/connection.rb', line 94

def get_sockname
  if sock_name = @channel.sock_name
    ::Socket.pack_sockaddr_in(*sock_name)
  end
end

#get_statusObject



100
101
# File 'lib/zmachine/connection.rb', line 100

def get_status
end

#notify_readable=(mode) ⇒ Object



103
104
105
# File 'lib/zmachine/connection.rb', line 103

def notify_readable=(mode)
  _not_implemented
end

#notify_readable?Boolean

Returns:

  • (Boolean)


107
108
109
# File 'lib/zmachine/connection.rb', line 107

def notify_readable?
  _not_implemented
end

#notify_writable=(mode) ⇒ Object



111
112
113
# File 'lib/zmachine/connection.rb', line 111

def notify_writable=(mode)
  _not_implemented
end

#notify_writable?Boolean

Returns:

  • (Boolean)


115
116
117
# File 'lib/zmachine/connection.rb', line 115

def notify_writable?
  _not_implemented
end

#pauseObject



119
120
121
# File 'lib/zmachine/connection.rb', line 119

def pause
  _not_implemented
end

#paused?Boolean

Returns:

  • (Boolean)


123
124
125
# File 'lib/zmachine/connection.rb', line 123

def paused?
  _not_implemented
end

#pending_connect_timeout=(value) ⇒ Object Also known as: set_pending_connect_timeout



127
128
# File 'lib/zmachine/connection.rb', line 127

def pending_connect_timeout=(value)
end

#post_initObject

callbacks



24
25
# File 'lib/zmachine/connection.rb', line 24

def post_init
end

#proxy_completedObject



132
133
134
# File 'lib/zmachine/connection.rb', line 132

def proxy_completed
  _not_implemented
end

#proxy_incoming_to(conn, bufsize = 0) ⇒ Object



136
137
138
# File 'lib/zmachine/connection.rb', line 136

def proxy_incoming_to(conn, bufsize = 0)
  _not_implemented
end

#proxy_target_unboundObject



140
141
142
# File 'lib/zmachine/connection.rb', line 140

def proxy_target_unbound
  _not_implemented
end

#receive_data(data) ⇒ Object



30
31
# File 'lib/zmachine/connection.rb', line 30

def receive_data(data)
end

#resumeObject



144
145
146
# File 'lib/zmachine/connection.rb', line 144

def resume
  _not_implemented
end

#send_datagram(data, recipient_address, recipient_port) ⇒ Object



150
151
152
# File 'lib/zmachine/connection.rb', line 150

def send_datagram(data, recipient_address, recipient_port)
  _not_implemented
end

#send_file_data(filename) ⇒ Object



154
155
156
# File 'lib/zmachine/connection.rb', line 154

def send_file_data(filename)
  _not_implemented
end

#ssl_handshake_completedObject



160
161
162
# File 'lib/zmachine/connection.rb', line 160

def ssl_handshake_completed
  _not_implemented
end

#ssl_verify_peer(cert) ⇒ Object



164
165
166
# File 'lib/zmachine/connection.rb', line 164

def ssl_verify_peer(cert)
  _not_implemented
end

#start_tls(args = {}) ⇒ Object



168
169
170
# File 'lib/zmachine/connection.rb', line 168

def start_tls(args = {})
  _not_implemented
end

#stop_proxyingObject



172
173
174
# File 'lib/zmachine/connection.rb', line 172

def stop_proxying
  _not_implemented
end

#stream_file_data(filename, args = {}) ⇒ Object



176
177
178
# File 'lib/zmachine/connection.rb', line 176

def stream_file_data(filename, args = {})
  _not_implemented
end

#unbindObject



33
34
# File 'lib/zmachine/connection.rb', line 33

def unbind
end