Class Irc::IrcSocket
In: lib/rbot/ircsocket.rb
Parent: Object

wrapped TCPSocket for communication with the server. emulates a subset of TCPSocket functionality

Methods

clearq   connect   flush   gets   new   puts   puts_critical   queue   select   sendq_burst=   sendq_delay=   shutdown   spool  

Attributes

lines_received  [R]  total number of lines received from the irc server
lines_sent  [R]  total number of lines sent to the irc server
sendq_burst  [R]  max lines to burst
sendq_delay  [R]  delay between lines sent

Public Class methods

server:server to connect to
port:IRCd port
host:optional local host to bind to (ruby 1.7+ required)

create a new IrcSocket

Public Instance methods

open a TCP connection to the server

flush the TCPSocket

get the next line from the server (blocks)

used to send lines to the remote IRCd message: IRC message to send

Wraps Kernel.select on the socket

shutdown the connection to the server

pop a message off the queue, send it

Private Instance methods

same as puts, but expects to be called with a mutex held on @qmutex

[Validate]