lib/uv/tcp.rb in uvrb-0.1.4 vs lib/uv/tcp.rb in uvrb-0.2.0

- old
+ new

@@ -2,9 +2,15 @@ module UV class TCP include Stream, Net + def open(fd) + check_result! UV.tcp_open(handle, fd) + + self + end + def bind(ip, port) assert_type(String, ip, "ip must be a String") assert_type(Integer, port, "port must be an Integer") @socket = create_socket(IPAddr.new(ip), port) \ No newline at end of file