# NOTE: Derived from blib/lib/Net/SOCKS.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Net::SOCKS;

#line 495 "blib/lib/Net/SOCKS.pm (autosplit into blib/lib/auto/Net/SOCKS/_method_response5.al)"
sub _method_response5 {
  my ($self) = @_;
  my $received = '';
  
  while ( read(${*self}{fh}, $received, 2) && (length($received) < 2) ) {}

  my ($ver, $method) = unpack 'CC', $received;
  if ($ver!=5) {return SOCKS_UNSUPPORTED_PROTOCOL_VERSION}
  if ($method==255) {return SOCKS_SERVER_DENIES_AUTH_METHOD}
  ${*self}{returned_method} = $method;
}

# end of Net::SOCKS::_method_response5
1;
