Page
Library
Module
Module type
Parameter
Class
Class type
Source
Irc_client.Make
Sourcemodule Io : Irc_transport.IO
Send the given message
Send the JOIN command.
Send the NICK command.
Send the PASS command.
Send the PONG command.
Send the PRIVMSG command.
Send the NOTICE command.
Send the QUIT command.
val send_user :
connection:connection_t ->
username:string ->
mode:int ->
realname:string ->
unit Io.t
Send the USER command.
val connect :
?username:string ->
?mode:int ->
?realname:string ->
?password:string ->
?config:Io.config ->
addr:Io.inet_addr ->
port:int ->
nick:string ->
unit ->
connection_t Io.t
Connect to an IRC server at address addr
. The PASS command will be sent if password
is not None.
val connect_by_name :
?username:string ->
?mode:int ->
?realname:string ->
?password:string ->
?config:Io.config ->
server:string ->
port:int ->
nick:string ->
unit ->
connection_t option Io.t
Try to resolve the server
name using DNS, otherwise behaves like connect
. Returns None
if no IP could be found for the given name.
Information on keeping the connection alive
val listen :
?keepalive:keepalive ->
connection:connection_t ->
callback:(connection_t -> Irc_message.parse_result -> unit Io.t) ->
unit ->
unit Io.t
listen connection callback
listens for incoming messages on connection
. All server pings are handled internally; all other messages are passed, along with connection
, to callback
.
val reconnect_loop :
?keepalive:keepalive ->
?reconnect:bool ->
after:int ->
connect:(unit -> connection_t option Io.t) ->
f:(connection_t -> unit Io.t) ->
callback:(connection_t -> Irc_message.parse_result -> unit Io.t) ->
unit ->
unit Io.t