Google

"DTD/xhtml1-strict.dtd">
Class Irc::IrcSocket
In: rbot/ircsocket.rb
Parent: Object
Class: JoinMessage Class: PartMessage Class: Plugins Class: KickMessage Class: IrcAuth Class: IRCChannel Class: IrcSocket Class: BotConfig Class: Keywords Class: BotRegistryAccessor Class: IrcClient Class: DBHash Class: Language Class: TopicMessage Class: QuitMessage Class: PrivMessage Class: UserMessage Class: NoticeMessage Class: IrcBot Class: BasicUserMessage Class: NickMessage Class: Plugin Class: BotRegistry Class: Keyword Class: DBTree Module: Irc

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

Methods
clearq    connect    flush    get_maxburst    get_sendq    gets    new    puts    puts_critical    queue    select    set_maxburst    set_sendq    shutdown    spool    spooler   
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

Public Class methods
new(server, port, host, sendfreq=2, maxburst=4)
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
connect()

open a TCP connection to the server

set_sendq(newfreq)
set_maxburst(newburst)
get_maxburst()
get_sendq()
puts(message)

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

gets()

get the next line from the server (blocks)

queue(msg)
spooler()
spool()

pop a message off the queue, send it

clearq()
flush()

flush the TCPSocket

select(timeout)

Wraps Kernel.select on the socket

shutdown(how=2)

shutdown the connection to the server

Private Instance methods
puts_critical(message)

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