A-Soft IM
Главная | Регистрация | Вход
Суббота, 17.11.2018, 14:34
Меню сайта
Категории каталога
TECH DOC [1]
Техническая документация A-Soft IM и других сетевых проколов и т.д.
Наш опрос
Оцените мой сайт
Всего ответов: 4
Главная » Статьи » TECH DOC

A-SOFT IM protocol spec 1.0 BETA
A-SOFT IM protocol spec 1.0 BETA


LOGO A-SOFT IM CLIENT                                                                 LOGO A-SOFT IM SERVER

--
1. Delimeters
--

Next Section Delimeter = SEPЈЙпеЄфЦѓSEP
End of Packet/Message = ENDЈЙпеЄфЦѓEND

The high ascii char's are 163 201 239 229 170 244 214 131

--
2. Data Format
--

0 = Command
1 = Nick Sending Command
2 = Nick Recieving Command
3 = Data Field 1
4 = Data Field 2
5 = Data Field 3
6 = Data Field 4
7 = Data Field 5

--
3. Commands from Server to Client
--

1. welcome
    - Data1 holds the version of the server.
    - Data2 holds the client support options.
    - Expected response from Client.
        1. Send Login information.
        2. Disable functions that the Client Support options tell it to.

2. GoodLogin
    - Data1 holds whether they are an admin or not.
    - Expected response from Client.
        1. Send GetUsers command.
        2. Since Server/Port/Login/Password seem good, save them for next time we start the client.

3. BadLogin
    - Data1 holds the reason message.
    - Expected response from Client.
        1. Inform user that they cannot login, display the reason from Data1.

4. UserList
    - Data1 holds the count of current (online) users.
    - Expected response from Client.
        1. Clear list of users and friends

5. UserListAdd
    - Data1 holds the list of current (online) users.
    - data3 holds whether the friend is away or not, ON = away, OFF = not away
    - Expected response from Client.
        1. Add the user to the list

6. UserListDone
    - Expected response from Client.
        1. Nothing required

7. AddUser
    - Data1 holds the user to Add.
    - Expected response from Client.
        1. Add the user in Data1 to the list of users.
        2. If we have a chat window with this person open already, put a message in
            that window, stating that the user has signed back on.

8. UserRemv
    - Data1 holds the user to remove.
    - Expected response from Client
        1. Remove the user in Data1 to the list of users.
        2. If we have a chat window with this person open already, put a message in
            that window, stating that the user has signed off.

9. CloseConn
    - No extra data
    - Expected response from Client.
        1. Close/Unload all windows, and return user to the login screen.

10. AddedFriend
    - data1 contains the username of the friend that was added.
    - Expected response from Client.
        1. Tell user (msgbox) that the friend specified in data1 was added.

11. DeletedFriend
    - data1 contains the username of the friend that was deleted.
    - Expected response from Client.
        1. Tell user (msgbox) that the friend specified in data1 was deleted.

12. AddFriendFailed
    - data1 contains the username of the friend that was not added.
    - Expected response from Client.
        1. Tell user (msgbox) that the friend specified in data1 was not added.

13. DeleteFriendFailed
    - data1 contains the username of the friend that was not deleted.
    - Expected response from Client.
        1. Tell user (msgbox) that the friend specified in data1 was not deleted.

14. ChatUsers
    - data1 contains the usercount.
    - data2 contains the topic.
    - data3 contains the channel name.
    - Expected response from Client.
        1. Open new chat window for the channel.
        2. Add users from data1 to the list on the chat room window.

15. ChatUserAdd
    - data1 has the user.
    - data2 has the users mode.
    - data3 has the channel.
    - data4 tells you whether to show the join or not (ON OR OFF, this is used to NOT show joins when adding the
        initial users when you first join.)
    - Expected response from Client.
        1. Add the user in Sender to the list on the chat room window.

16. ChatUserRemove
    - data1 has the user.
    - data3 has the channel.
    - Expected response from Client.
        1. Remove the user in Sender from the list on the chat room window.

17. ChatMessage
    - data1 holds the message.
    - data3 has the channel.
    - Expected response from Client.
        1. Add the message to the chat room window.

18. ChatFail
    - data1 holds the reason (message).
    - data3 has the channel (if any).
    - Expected response from Client.
        1. display the message to the user.

19. ChannelList
    - Expected response from Client.
        1. Open the channel list window

20. ChannelListAdd
    - data1 holds the channel.
    - data2 holds the usercount.
    - data3 holds the topic
    - Expected response from Client.
        1. Fill the channel list if it is open.

21. AddChatChannel
    - data1 holds the topic
    - data2 holds the user count
    - data3 holds the channel.
    - Expected response from Client.
        1. if the channel list is open, add the channel.

22. RemoveChatChannel
    - data3 holds the channel
    - Expected response from Client
        1. if the channel list is open, remove the channel.

23. UpdateChatChannel
    - data1 holds the topic.
    - data2 holds the usercount.
    - data3 holds the channel.
    - Expected response from Client.
        1. if the channel list is open, update the channel.
        2. if the channel is open, update the topic.

24. Mode
    - data1 holds the mode.
    - data2 holds the users name.
    - data3 holds the channel if the entity is a channel or a UserOnChannel.
    - Expected response from Client
        1. Take the mode and apply it to the correct entity.

25. CMode
    - data1 holds the mode.
    - data2 holds the channel.
    - data3 holds the full channel mode.
    - Expected response from Client.
        1. Apply the mode to the correct channel

26. UMode
    - data1 holds the mode.
    - data2 holds the away message.
    - Expected response from Client
        1. Apply the mode to the correct menu item, or anything else
            showing the user the new mode.

27. ChannelEvent
    - data1 holds the event.    
    - data2 holds the message.
    - data3 holds the channel.
    - Expected response from Client
        1. Show the user.

28. AddedChannelBan
    - data1 holds the user getting banned.
    - data3 holds the channel.
    - Expected response from Client.
        1. If the channel is open, show it to the user in the channel.

29. RemovedChannelBan
    - data1 holds the user getting unbanned.
    - data3 holds the channel.
    - Expected response from Client
        1. If the channel is open, show it to the user in the channel.

30. ChannelKick
    - data1 holds the user getting kicked.
    - data2 holds the reason.
    - data3 holds the channel.
    - Expected response from Client
        1. If the channel is open, and the user is in it, remove him.
            A. if the user is the same as the client, close
                the channel form also.
        2. Show the user that they or someone else were kicked.

31. GenericError
    - data1 holds the error message
    - Expected response from Client
        1. Show the error to the user.

32. ReceiveFile
    - data1 holds the file.
    - data2 holds the length.
    - data3 holds the packet size.
    - Expected response from Client.
        1. DenyFile or GetFile

33. GetFile
    - data1 holds the file.
    - data2 holds the length.
    - data2 holds the packet size.
    - data4 holds the save name for the receiver.
    - data5 holds the ip to connect to.
    - Expected response from Client.
        1. connect to the IP and send the file.

34. DenyFile
    - data1 holds the file.
    - Expected response from Client.
        1. show the user that the file was denied by the receiver.

35. AddedBlock
    - data1 contains the username of the block that was added.
    - Expected response from Client.
        1. Tell user (msgbox) that the block specified in data1 was added.

36. DeletedBlock
    - data1 contains the username of the block that was deleted.
    - Expected response from Client.
        1. Tell user (msgbox) that the block specified in data1 was deleted.

37. AddBlockFailed
    - data1 contains the username of the block that was not added.
    - Expected response from Client.
        1. Tell user (msgbox) that the block specified in data1 was not added.

38. DeleteBlockFailed
    - data1 contains the username of the block that was not deleted.
    - Expected response from Client.
        1. Tell user (msgbox) that the block specified in data1 was not deleted.

39. MessageBlocked
    - Expected response from Client.
        1. Tell user (msgbox) that the message could not be sent because the Receiver
            has blocked the user.

40. NewUserSignupSuccess
    - Expected response from the Client.
        1. Tell the user that the signup worked.

41. NewUserSignupFailed
    - Expected response from the Client.
        1. Tell the user the signup failed.

42. ServerMessage
    - data1 holds the message
    - Expected response from the Client.
        1. Show the message to the user.

45. UserAway
    - data1 holds the user that is away.
    - data2 holds the away message.
    - Expected response from the Client.
        1. Tell the user that the person they tried to contact is away.

46. FriendsList
    - data1 holds the count of friends.
    - Expected response form the Client.
        1. Clear the list of friends.

47. FriendsListAdd
    - data1 holds the friend to add.
    - data3 holds whether the friend is on or not, ON = online, OFF = offline
    - Expected Response from the Client.
        1. Add the friend to the list.

48. FriendsListDone
    - Expected Response from the Client.
        1. Nothing expected.

49. BlocksList
    - data1 holds the count of blocks.
    - Expected Response from the Client.
        1. Clear the list of blocks.

50. BlocksListAdd
    - data1 holds the blocked user to add.
    - data3 holds whether the block is on or not, ON = online, OFF = offline
    - Expected Response from the Client.
        1. Add the block to the list.

51. BlocksListDone
    - Expected Response from the Client.
        1. Nothing expected.

52. SetAway
    - Sender is who is changing mode.
    - data1 holds whether the friend is away or not, ON = away, OFF = not away
    - Expected Response from the Client.
        1. Show the user in some way.

53. Banned
    - data1 is the ban message
    - Expected Response from the Client.
        1. Show the user the ban reason.
        2. Disconnect.

54. FavoritesList
    - data1 holds the count of favorite channels.
    - Expected Response from the Client.
        1. Clear the list of favorites, getting ready for the new list.

55. FavoritesListAdd
    - data1 holds the favorite channel to add.
    - Expected Response from the Client.
        1. Add the channel to the list of favorites.

56. FavoritesListDone
    - Expected Response from the client.
        1. Nothing expected.

57. DeletedFavorite
    - data1 holds the favorite that was deleted.
    - Expected Response from the Client.
        1. Tell the user in some way.

58. DeleteFavoriteFailed
    - data1 holds the favorite that was not deleted.
    - Expected Response from the Client.
        1. Tell the user in some way.

59. AddedFavorite
    - data1 holds the favorite that was added.
    - Expected Response from the Client.
        1. Tell the user in some way.

60. AddFavoriteFailed
    - data1 holds the favorite that was not added.
    - Expected Response from the Client.
        1. Tell the user in some way.

61. ChatUsersDone
    - Expected Response from the Client.
        1. Nothing yet.

--
4. Comands From Client to Server
--


1. Login
    - Sender holds the username of the person loging in.
    - data1 holds their password.
    - data2 holds the version of the client.
    - Expected response from server
        1. Check user, login or deny.

2. GetUsers
    - Expected response from Server
        1. Send the UserList message, with all the online users.

3. UsersDone
    - No extra data
    - Expected response from Server
        1. Add this user to every other client connected.

4. SignOff
    - Sender holds the name of the user signing off
    - Expected response from Server
        1. Tell all clients to remove the user
        2. remove the user from the list on the server.

5. AddFriend
    - Data1 contains the friends username.
    - Expected response from server.
        1. AddedFriend or AddFriendFailed

6. DeleteFriend
    - Data1 contains the friends username.
    - Expected response from server.
        1. DeletedFriend or DeleteFriendFailed

7. AddToChat
    - data1 holds the channel
    - Expected response from server.
        1. Add user to chat channel.

8. ChatUsersDone
    - data3 holds the channel
    - Expected response from server.
        1. This message means the user has received the list from ChatUsers
            and is done adding them. Now we have to tell all the other
            chat room users to add this user to their list.

9. RemoveFromChat
    - data3 holds the channel
    - Expected response from server.
        1. Remove the user from the list of chat users for that channel.
        2. Tell all other chat users to remove the user (ChatUserRemove command).

10. ChatMessage
    - data1 holds the message.
    - data2 holds the type
    - data3 holds the channel
    - Expected response from server.
        1. Send this message to all other chat room users.

11. GetChannels
    - no extra data
    - Expected response from server.
        1. Send user (sender) channel information (users, topic).

12. ChatTopic
    - data1 holds the topic
    - data3 holds the channel
    - Expected response from server.
        1. send the new topic to every user in that channel.

13. Mode
    - data1 holds the mode.
    - data2 holds the users name
    - data3 holds the channel if the entity is a channel or a UserOnChannel.
    - Expected response from Server
        1. Take the mode and apply it to the correct entity.

14. CMode
    - data1 holds the mode.
    - data2 holds the channel.
    - Expected response from Server
        1. Apply the mode to the correct channel, by sending it to all the
            channels users.

15. UMode
    - data1 holds the mode.
    - data2 holds the away message.
    - Expected response from Server.
        1. Send back the correct new mode string for the user.

16. GetChannelBans
    - data3 holds the channel.
    - Expected response from Server.
        1. send the list of bans for the channel back to the user via the ChannelBans message.

17. AddChannelBan
    - data1 holds the user to ban.
    - data3 holds the channel.
    - Expected response from Server.
        1. If the Sender is an op currently, then ban the user specified (if they arent already banned).

18. RemoveChannelBan
    - data1 holds the user to unban.
    - data3 holds the channel.
    - Expected response from Server.
        1. If the Sender is an op currently, then unban the user specified (if they are already banned).

19. ChannelKick
    - data1 holds the user getting kicked.
    - data2 holds the reason.
    - data3 holds the channel.
    - Expected response from Server.
        1. Remove user from channel. Tell every other member of the channel
            that the user was kicked. (with the ChannelKick from server to
            client message)

20. SendFile
    - data1 holds the filename.
    - data2 holds the length.
    - data3 holds the packet size.
    - Expected response from Server.
        1. send the ReceiveFile command to the Receiver.

21. DenyFile
    - data1 holds the file.
    - Expected response from Server.
        1. Send the DenyFile command to the Receiver.

22. GetFile
    - data1 holds the file.
    - data2 holds the length.
    - data3 holds the packet size.
    - data4 holds the name the reciever is saving it as.
    - data5 holds the ip of the reciever. to connect and send the file.
    - Expected response from Server.
        1. Send the GetFile command to the Receiver.

23. AddBlock
    - Data1 contains the blockie's username.
    - Expected response from server.
        1. AddedBlock or AddBlockFailed

24. DeleteBlock
    - Data1 contains the blockie's username.
    - Expected response from server.
        1. DeleteBlock or DeleteBlockFailed

25. GetFriends
    - Expected response from server.
        1. Send friends.

26. GetBlocks
    - Expected response from server.
        1. Send blocks.

27. NewUserSignup
    - data1 holds the New User Password
    - data2 holds the username of the new user
    - data3 holds the password of the new user
    - Expected response from server.
        1. Verify the new user password, if its good, add the user and tell them.
        2. If the password isnt good, tell them it was denied.

28. ChangePassword
    - data1 holds the old password.
    - data2 holds the new password.
    - Expected response from server.
        1. If the passwords are good, change the password.
        2. If they arent, send a ServerMessage telling them it didnt change.

25. GetFavorites
    - Expected response from server.
        1. Send favorites.

26. AddFavorite
    - data1 holds the new favorite to add.
    - Expected response from the server.
        1. Add the favorite if it can.
        2. Send AddedFriend or AddFriendFailed

27. DeleteFavorite
    - data1 holds the favorite to delete.
    - Expected response from the server.
        1. Delete the favorite if it can.
        2. Send DeletedFriend or DeleteFriendFailed
 

28. ChannelAdmin
    - data1 holds the command
        1. Commands: AddOwner, RemoveOwner, AddAdmin, RemoveAdmin, AddOp, RemoveOp,
            AddNonOp, RemoveNonOp, AddVoice, RemoveVoice, AddNonVoice, RemoveNonVoice,
            AddBan, RemoveBan, Topic, EnforceModes, List, RegisterChannel.
    - data2 holds extra information (such as user to do it to)
        1. On all Add and Remove commands data2 is the user its affecting.
        2. If the command is EnforceModes then data2 is either ON or OFF.
        3. If the command is List then data2 is one of these: Owners, Admins, Ops, NonOps,
            Voice, NonVoice.
    - data3 holds the channel
    - Expected response from the server.
        1. Do the command if the sender is an owner or admin.
        2. Tell the sender the results.

29. GetAWayMessage
    - data1 holds the user whose away message the client wants.
    - Expected response from the server.
        1. If the user is away, send the UserAway command.

30. Whois
    - data1 holds the user who they are looking for
    - data3 might hold a channel
    - Expected response from the server.
        1. Only works for admins.
        2. If data3 is a channel that is open now, send the
            whois back as ChannelEvents.
        3. If data3 is not a channel, send the whois back
            as a ServerMessage.

--
5. Comands From Client to Server to Client
--

1. NoCrypt
    - Data1 holds the user to stop using encryption with.
    - Expected response from Client
        1. Find that users window, and turn encryption off for that window.
        2. Inform the client in that window, via a message, that encryption
            has now been turned off.

2. Cryption
    - Data1 holds the user to start using encryption with.
    - Data2 holds the key to use for encryption and decryption.
    - Expected response from Client
        1. Find that users window, and turn encryption on for that window.
        2. Inform the client in that window, via a message, that encryption
            has now been turned on.

3. CloseWin
    - Sender is the person who closed the window.
    - Receiver is the person whose window is getting closed.
    - Expected response from Client
        1. Find the window for that person. Inform the client via a message that
            the user has closed that window with them.

4. Message
    - Sender is the person sending the message
    - Receiver is who the message is too.
    - Data1 is the message.
    - Data3 tells wether the message is encrypted or not, ON/OFF
    - Expected response from Client
        1. Find the window for that sender, check to see if its encrypted or not.
            If its encrypted, decrypt it and show it in the window, else
            just show it in the window.

5. WhiteBoardRequest
    - Sender is the person requesting to start a WhiteBoard session.
    - Receiver is the person that Sender wants to draw with.
    - Expected response from the Client
        1. Ask the user if they want to do the Whiteboard or not.
        2. If the user says yes, send a WhiteBoardStart message to Sender, and
            bring up the whiteboard window.
        3. If the user says no, send a WhiteBoardDeny message to Sender.

6. WhiteBoardStart
    - Sender is the person ok'ing the whiteboard (Receiver from WhiteBoardRequest)
    - Receiver is the person who asked for the whiteboard.
    - Expected response from the Client
        1. Bring up the whiteboard window.

7. WhiteBoardDeny
    - Sender is the person denying the whiteboard.
    - Receiver is the person who asked for the whiteboard.
    - Expected response from the Client
        1. Tell the Receiver that the Sender doesnt want to draw.

8. WhiteBoardClear
    - Sender is the person clearing.
    - Receiver is the person who needs the screen updated.
    - Expected response from the Client
        1. Clear the drawing.

9. WhiteBoardDraw
    - Sender is the person drawing.
    - Receiver is the person who needs the screen updated.
    - Data1 is the drawing data.
    - Expected response from the Client
        1. Draw the line.

10. WhiteBoardClose
    - Sender is the person closing.
    - Receiver is the person who still has it open
    - Expected response from the Client
        1. Inform the Receiver that the Sender has closed the whiteboard.

11. WhiteBoardDrawLine
    - data1 holds x1
    - data2 holds y1
    - data3 holds x2
    - data4 holds y2
    - data5 holds color
    - Expected response from the Client
        1. Draw the line.

11. WhiteBoardDrawCircle
    - data1 holds x1
    - data2 holds y1
    - data3 holds x2
    - data4 holds y2
    - data5 holds color
    - Expected response from the Client
        1. Draw the Circle.

11. WhiteBoardDrawRectangle
    - data1 holds x1
    - data2 holds y1
    - data3 holds x2
    - data4 holds y2
    - data5 holds color
    - Expected response from the Client
        1. Draw the Rectangle.

12. ChannelInvite
    - data1 holds the channel being invited to
    - Expected response from the Client
        1. Ask the user if they want to join. Join if they say yes.


--
6. Chat commands for Users
--

1. /me
    - this sends an Action (irc style) to the other users in the channel
    ex: /me did something
        "* User did something"

2. /topic
    - this changes the topic for the current channel.
    ex: /topic This is a new topic.
          "*** Topic in Channel changed by: User to [ This is a new topic. ]"

3. /umode
    - this is used to set your user modes
    - acceptable modes are Away (+A) and Invisible (+I)
    ex: /umode +a
    - this example sets you away.

4. /cmode
    - this is used to change a mode for a channel
    - acceptable modes are K, T, M, P, L
        K = keyed, requires password to enter
        T = Topic is only changeable by ops
        M = moderated, only ops or voiced people can talk
        P = private, doesnt show up in the channel list.
        L = limit, only a certain amount of people can be in the channel
    (note: only T, P, and M are implemented yet)

5. /mode
    - this is used to change the mode of a user on a channel
    ex: /mode CHANNNEL -o USER
    - this example would take ops away from USER on CHANNEL
    - acceptable modes are O, V
        O = ops, power to do things in the channel that non-ops cant do.
        V = voiced, can talk even when not opped and the channel is moderated (+M)

6. /ban
    - this is used to ban someone from entering a channel
    ex: /ban USER
    or
    ex: /ban CHANNEL USER
    - you can specify a channel or not. if you dont then it works on the current channel

7. /unban
    - this is used to unban someome from a channel
    ex: /unban USER
    or
    ex: /unban CHANNEL USER
    - you can specify a channel or not. if you dont then it works on the current channel

8. /bans
    - this is used to list the bans on a channel
    ex: /bans
    or
    ex: /bans CHANNEL
    - you can specify a channel or not. if you dont then it works on the current channel

9. /kick
    - this is used to kick a user from a channel
    ex: /kick user reason
    or
    ex: /kick channel user reason
    - you can specify a channel or not. if you dont then it works on the current channel

10. /invite
    - this is used to invite a user to a channel
    ex: /invite channel user
    or
    ex: /invite user
    (this one will invite the user to the current channel)

11. /away
    - this is used to set yourself away
    ex: /away
    or
    ex: /away message
    - if you dont specify a messsage it just uses the servers default

12. /back
    - this is used to make yourself not away.
    ex: /back
    or
    ex: /back message
    - the message from the second example is just shown in the current channel
        it has no other purpose.

--
7. Example of a good login procedure, by looking at what messages get sent.
--

1. Client connects to Server.
2. Server sends "welcome" to Client.
3. Client sends "Login" to Server.
4. Server sends "GoodLogin" to Client.
5. Server sends "AddUser" to all the other users online.
6. Client sends "GetUsers" to Server
7. Server sends "UserList" to Client.
8. Server sends "UserListAdd" to Client, for each user online.
9. Server sends "UserListDone" to Client.
10. Client sends "GetFriends" to Server.
11. Server sends "FriendsList" to Client.
12. Server sends "FriendsListAdd" to Client, for each friend.
13. Server sends "FriendsListDone" to Client.
14. Client sends "GetBlocks" to Server.
15. Server sends "BlocksList" to Client.
16. Server sends "BlocksListAdd" to Client, for each blocked user.
17. Server sends "BlocksListDone" to Client.

That is what happens when a client connects to the server. Any questions? :)


--
end
--

SCREENSHOT CLIENT
SCREENSHOT SERVER
Категория: TECH DOC | Добавил: asim (10.12.2007)
Просмотров: 3940 | Комментарии: 3 | Рейтинг: 0.0/0 |
Всего комментариев: 2
2 Gypeadvoday  
Download 48 hrs http://www.vod.com.ua/skachat-film-48-chasov-27.html HD 48 часов 1982

1 ReurgeCem  
Hi !.
You may , probably very interested to know how one can manage to receive high yields .
There is no initial capital needed You may begin to get income with as small sum of money as 20-100 dollars.

AimTrust is what you thought of all the time
AimTrust represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

It is based in Panama with offices everywhere: In USA, Canada, Cyprus.
Do you want to become a happy investor?
That`s your chance That`s what you desire!

I`m happy and lucky, I began to get income with the help of this company,
and I invite you to do the same. If it gets down to choose a proper companion utilizes your funds in a right way - that`s it!.
I earn US$2,000 per day, and my first investment was 500 dollars only!
It`s easy to join , just click this link http://utinicomun.freewebportal.com/cyguzesy.html
and lucky you`re! Let`s take our chance together to get rid of nastiness of the life


Имя *:
Email *:
Код *:
Форма входа
Поиск
Друзья сайта
Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0
Copyright MyCorp © 2018
Сайт управляется системой uCoz