Class: ShadowsocksRuby::Connections::TCP::RemoteServerConnection

Inherits:
BackendConnection show all
Defined in:
lib/shadowsocks_ruby/connections/tcp/remoteserver_connection.rb

Overview

A RemoteServerConnection’s job is relay data from remoteserver to client.

Constant Summary

Constants inherited from Connection

Connection::PressureLevel

Instance Attribute Summary

Attributes inherited from BackendConnection

#packet_protocol, #params

Attributes inherited from Connection

#logger, #plexer

Instance Method Summary collapse

Methods inherited from BackendConnection

#connection_completed, #initialize, #send_data

Methods inherited from Connection

#async_recv, #async_recv_until, #peer, #send_data, #unbind

Constructor Details

This class inherits a constructor from ShadowsocksRuby::Connections::BackendConnection

Instance Method Details

#process_hookObject

This is Called by process loop



8
9
10
11
# File 'lib/shadowsocks_ruby/connections/tcp/remoteserver_connection.rb', line 8

def process_hook
  data = packet_protocol.tcp_receive_from_remoteserver(-1)
  plexer.packet_protocol.tcp_send_to_client(data)
end