688 @param redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
688 @param redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
689 =end |
689 =end |
690 if remoteAddress == nil |
690 if remoteAddress == nil |
691 sock = TCPSocket.new(DebugAddress, port) |
691 sock = TCPSocket.new(DebugAddress, port) |
692 else |
692 else |
|
693 if remoteAddress =~ /@@i/ |
|
694 remoteAddress, interface = remoteAddress.split("@@i") |
|
695 else |
|
696 interface = 0 |
|
697 end |
|
698 if remoteAddress.downcase =~ /^fe80/ |
|
699 remoteAddress = "%s%%%s" % [remoteAddress, interface] |
|
700 end |
693 sock = TCPSocket.new(remoteAddress, port) |
701 sock = TCPSocket.new(remoteAddress, port) |
694 end |
702 end |
695 |
703 |
696 @readstream = AsyncFile.new(sock, "r", "stdin") |
704 @readstream = AsyncFile.new(sock, "r", "stdin") |
697 @writestream = AsyncFile.new(sock, "w", "stdout") |
705 @writestream = AsyncFile.new(sock, "w", "stdout") |