### Home Classes Methods

### In Files

- lib/cool.io/socket.rb

### Parent

Socket

### Methods

- ::new
- #peeraddr

### Class/Module Index

Quicksearch

- Coolio
- Coolio::AsyncWatcher
- Coolio::Connections
- Coolio::DNSResolver
- Coolio::DNSResolver::Timeout
- Coolio::DSL
- Coolio::DSL::ConnectionBuilder
- Coolio::IO
- Coolio::IO::Watcher
- Coolio::IOWatcher
- Coolio::Listener
- Coolio::Loop
- Coolio::Meta
- Coolio::Server
- Coolio::Socket
- Coolio::Socket::Connector
- Coolio::TCPListener
- Coolio::TCPServer
- Coolio::TCPSocket
- Coolio::TCPSocket::TCPConnectResolver
- Coolio::TCPSocket::TCPConnectSocket
- Coolio::TimerWatcher
- Coolio::UNIXListener
- Coolio::UNIXServer
- Coolio::UNIXSocket
- Cool
- Cool::Coolness
- Cool::IOThunk
- Object
- Thread

No matching classes.

# Coolio::TCPSocket::TCPConnectSocket

### Public Class Methods

new(family, addr, port, host = addr) click to toggle source

    # File lib/cool.io/socket.rb, line 158
    def initialize(family, addr, port, host = addr)
      @host, @addr, @port = host, addr, port
      @address_family = nil

      super(family, ::Socket::SOCK_STREAM, 0)
      begin
        connect_nonblock(::Socket.sockaddr_in(port, addr))
      rescue Errno::EINPROGRESS
      end
    end

### Public Instance Methods

peeraddr() click to toggle source

    # File lib/cool.io/socket.rb, line 169
    def peeraddr
      [
        @address_family == ::Socket::AF_INET ? 'AF_INET' : 'AF_INET6',
        @port,
        @host,
        @addr
      ]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.