Page
Library
Module
Module type
Parameter
Class
Class type
Source
Irc_client.MakeSourcemodule Io : Irc_transport.IOSend 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.tSend 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.tConnect 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.tTry 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.tlisten 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