Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid name scope problems.

  • Loading branch information...
commit 9bd9b1f5ab8844ab5d780579a06bd06a5afda4e3 1 parent 8086499
@meh meh authored committed
View
6 lib/em-socksify/errors.rb
@@ -1,4 +1,6 @@
-class EventMachine::Socksify::SOCKSError < Exception
+module EventMachine; module Socksify
+
+class SOCKSError < Exception
def self.define (message)
Class.new(self) {
def initialize
@@ -30,3 +32,5 @@ def self.for_response_code(code)
end
end
end
+
+end; end
View
6 lib/em-socksify/socks5.rb
@@ -1,4 +1,6 @@
-module EventMachine::Socksify::SOCKS5
+module EventMachine; module Socksify
+
+module SOCKS5
def socks_send_handshake
# Method Negotiation as described on
# http://www.faqs.org/rfcs/rfc1928.html Section 3
@@ -103,3 +105,5 @@ def socks_methods
methods
end
end
+
+end; end
View
6 lib/em-socksify/socksify.rb
@@ -1,4 +1,6 @@
-module EventMachine::Socksify
+module EventMachine
+
+module Socksify
def socksify(host, port, username = nil, password = nil, version = 5, &blk)
@socks_target_host = host
@socks_target_port = port
@@ -44,3 +46,5 @@ def socks_receive_data(data)
socks_parse_response
end
end
+
+end
View
8 lib/em-socksify/version.rb
@@ -1,5 +1,7 @@
module EventMachine
- module Socksify
- VERSION = "0.1.0"
- end
+
+module Socksify
+ VERSION = "0.1.0"
+end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.