Class: ShadowsocksRuby::Connections::UDP::DestinationConnection

Inherits:
BackendConnection show all
Defined in:
lib/shadowsocks_ruby/connections/udp/destination_connection.rb

Overview

A DestinationConnection's job is relay data from destination to localbackend.

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/udp/destination_connection.rb', line 8

def process_hook
  data = packet_protocol.udp_receive_from_destination(-1)
  plexer.packet_protocol.udp_send_to_localbackend(data)
end