We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ff8e37 commit 069ff05Copy full SHA for 069ff05
test/modules/post/test/socket_channels.rb
@@ -45,6 +45,15 @@ def udp_socket_pair(params)
45
def test_tcp_client_channel
46
print_status('Running TCP client channel tests...')
47
48
+ it 'Has the correct peer information' do
49
+ client, server_client = tcp_socket_pair({'PeerHost' => '127.0.0.1'})
50
+ address = server_client.local_address
51
+ ret = client.peerhost == address.ip_address && client.peerport == address.ip_port
52
+ client.close
53
+ server_client.close
54
+ ret
55
+ end
56
+
57
it 'Receives data from the peer' do
58
client, server_client = tcp_socket_pair({'PeerHost' => '127.0.0.1'})
59
data = Random.new.bytes(rand(10..100))
0 commit comments