GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
IO::Socket::Socks::Wrapped(3) User Contributed Perl Documentation IO::Socket::Socks::Wrapped(3)

IO::Socket::Socks::Wrapped - object wrapped by IO::Socket::Socks::Wrapper

        use WWW::Mechanize;
        use IO::Socket::Socks::Wrapped;
        
        my $ua = WWW::Mechanize->new;
        my $s_ua = IO::Socket::Socks::Wrapped->new($ua, {
                ProxyAddr => 'localhost',
                ProxyPort => 1080
        });
        
        $s_ua->get("http://google.com"); # via proxy
        $ua->get("http://google.com"); # direct
        
        $s_ua->isa('WWW::Mechanize'); # true
        $s_ua->can('is_html'); # true
        print ref($s_ua); # IO::Socket::Socks::Wrapped

"IO::Socket::Socks::Wrapped" is representation of object wrapped by "IO::Socket::Socks::Wrapper". You may create it directly by new() method or through IO::Socket::Socks::Wrapper::wrap_connection() subroutine. First parameter is original object, that internally uses IO::Socket for creation of tcp connections. Second is proxy configuration (see IO::Socket::Socks::Wrapper documentation). New IO::Socket::Socks::Wrapped object will use proxy specified in configuration for tcp connections. Original object also may be used, but it will make direct tcp connections. In fact new object uses original internally and has all it methods. So if you'll change some behaviour of original object, behaviour of wrapped object also will be changed.

You can access original object this way:

        my $orig = $wrapped_object->{orig};

Wrapped object behaviour for UNIVERSAL methods (isa, can, DOES) is same as original object behaviour. So, the following is true

        $wrapped_object->isa('Original::Package');

IO::Socket::Socks::Wrapper

Oleg G <oleg@cpan.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2017-02-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.