[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re[2]: [Mldonkey-users] MLChat
From: |
Zoggy |
Subject: |
Re: Re[2]: [Mldonkey-users] MLChat |
Date: |
Thu, 21 Nov 2002 09:15:31 +0100 |
Hi,
> i asking because i want to implement a port of mlchat in my app
> (mldonkey watch) a native win32 app.
>
> so i also looking for good protocol specs. but the specs looks more
> cryptical than the mldonkey core gui protocol specs ;)
Here are some (i hope better) explanations :
There are six types of messages, by now :
- HELLO_OK
- HELLO
- BYEBYE
- MESSAGE
- ADD_OPEN
- ROOM_MESSAGE
* When you launch mlchat, it sends HELLO to all the people it ine list of
people.
when a mlchat receives a HELLO, it replies by a HELLO_OK to indicate that it is
alive.
Both messages have this form:
<version>\n (currently 1.1)
<source_id>\n (id of the sender, a string on one line)
<source_host>\n (host of the sender,
a string on one line (can be an ip address or a hostname))
<source_port>\n (port of the sender, an integer)
<dest_id>\n (guess what ? a string on one line)
<message_type>\n (HELLO or HELLO_OK)
* The BYBYE message is sent when you quit mlchat, to tell people in your list
that you quit. Then they can display your id in grey (or whatever color they
choose to indicate that you're not connected).
the message is the same as above but <message_type>=BYBYE.
* The MESSAGE message is used to send a string to another mlchat (when you type
it in a dialog box and press enter).
The body is the same as above but the end is different :
... (same as above but different starting at the <message_type>)
MESSAGE\n (<message_type>=MESSAGE)
<message_body_length>\n (an integer to indicate the length of the
following string)
<message_body> (a string of the given length, can span over several lines)
* The ADD_OPEN message is used to tell mlchat to open a dialog box to talk to
the sender of the message (I used it to allow mldonkey to open a dialog window
to talk to someone who sent a chat message in mldonkey).
This message is no longer used and could be removed.
* The ROOM_MESSAGE message is used to send a message to several people at a
time. In fact, it is not really a room but rather a conference. I made a
mistake calling it ROOM...
The message has the followinf form :
... (same as all messages, differs starting at the <message_type>\n
ROOM_MESSAGE\n (<message_type>=ROOM_MESSAGE)
<message_room_name>\n (rooms are named, and a dialog window is open for each
room. The name is entered by the one who creates it.)
<message_room_people_number>\n (an integer to indicate how many people are in
the room/conference. For each people, there
are three following lines : )
<message_room_people_id>\n (id of a person in the room/conference)
<message_room_people_host>\n (his host (ip or hostname))
<message_room_people_port>\n (his port)
(The three elements above are repeated for each people )
<message_body_length>\n (the length of the text sent)
<message_body> (the text sent)
I hope it is clearer now. Feel free to ask if something is not well explained.
Bye,
--
Zoggy