So you want to make a client that connects to a VectorNet Server? Well, this is just how you do it. Note: By default, the port for VectorNet is 4800. Connection: you have to send a password to the server. Even if authentication isn't enabled, you still have to send the password. NOTE: The server will encrypt the password for auth checks, so whoever maintains the server cannot get their password. In VB6, for example, to send the first packet (0x01) you would do the following: [code]sckVectorNet.SendData Chr$(&H1) & Username & Chr$(0) & password & Chr$(0) & ClientType[/code] Current list of client types: 1 = VectorNet client 2 = StealthBot plugin 3 = VectorBot client 4 = VN Bot by Jd 5 = FailBot Client 6 = RiffBot by RiffRuff 7 = Unknown by JPT 8 = VectorNet Queue Slave 9 = LynxVN Client by Lynxy [size=4]Do NOT use the client types listed above in your implementation of the VectorNet client.[/size] NOTE: You will need to assign a length field do each packet you send to the server. Vice versa a length check in the DataArrival sub of your client as well. Use the SendPacket() sub for all calls to SendData. This is an example of what the sub should be like: [code] Public Sub SendPacket(ByVal ID As Byte, ByVal data As String) frmMain.sckSend.SendData Chr$(ID) & len(data) & Chr$(0) & data End Sub [/code] Events: [size=3]NOTE: The first packet the server sends you when you connect (properly) is 0x05. It then sends you 0x09, and 0x0F to all users who are in your channel[/size] Format: (description) = (this protocol description will separate data bits by (null)) [color="#FF0000"]Note: packets in red are currently unavailable.[/color] C > S 0x01 (Log onto VectorNet) = (null) (null) - This is the first packet you send to VectorNet when you sign on - The client type is an integer. See above for rnore information on existing client types. - If your client is not listed above, then choose the next number after the set Tell me your ID, and the name of your client, so I can add it to the list, and the server S > C 0x01 (user logged on to VectorNet) = (null) (null) - This packet is sent whenever someone joins VectorNet. - Client type is an integer - see above for more info on the client types C > S 0x02 (Send text) = (null) - When you talk on vectornet, you send this. S > C 0x02 (chat received) = (null) (null) - This packet is sent based on several chat events - The chat flag at current has five different values. They are: 0x01 = chat from admins 0x02 = chat from moderators 0x03 = chat from normal users 0x04 = a user you whispered, contains their name and the message you sent 0x05 = text whispered to you S > C 0x03 (custom info packet) = (null) - This is sent to you when the server sends a custom info message. - The code type can be either 0 or 1. [list] [*]0 - Server/Client Error [*]1 - ServerInfo Message [/list] S > C 0x04 (user left VectorNet) = - This packet is sent whenever someone logs off VectorNet. S > C 0x05 (Initial connect information) = (null) your auth string (normal, admin, or moderator) - This packet is sent to you after you send 0x01. S > C 0x06 (Server message) = - If you talk via the server, the message is sent via this packet C > S 0x07 (User information request) = - This packet allows you to retrieve specific information about a user. - Only the username is required. S > C 0x07 (User information response) = - This packet is received when a request is made about a specific user. - The information is returned in the following string: ping|client|channel. C > S 0x08 (Tic Tac Toe request) = (null) - In all circumstances, is the name of the opponent - The following packets are sent from the client: init request, init response, game request, game accept, game deny, game quit, start prepare, board move - init request sends an initialization from client to client, so that if a client supports tic-tac-toe, that client will send back a reply (init response) - Init response gets sent back to the client requesting the initialization - game request sends a request to the other client, to start a game of tic-tac-toe - game deny should be sent to the other client upon denying a game of tic tac toe - Game accept sends a message to the other client that you accepted a game of tic tac toe. They will respond with start prepare - Game quit sends a message to the other person when you deliberately quit out of an on-going tic tac toe game (close the form, etc.) - Game reset gets sent to the other player when you want to play the game again - start prepare determines who should go first. The client who accepts the game actually determines who should go first by randomizing a number between 0-1 or so (my client does 0-3, with 0, 1, being X, and 2, 3 being Y) to determine who gets O, and who gets X This event has an extra bit of data at the end of it: "start prepare" (null) (null) - board move contains the name of the user, and an integer representing the move on the board with which to make. The board moves are repesentative by this model: Top Left: 7 Top Right: 9 Bottom Left: 1 Bottom Right: 3 This event has an extra bit of data at the end of it: "board move" (null) (null) S > C 0x08 (Tic Tac Toe redirection) = - The server should just relay init request, init response, game request, game deny game accept, game reset, and game quit to the other client just as it was sent from the first client The responses should be (null) for the following types of requests: init request, init response, game request, game deny, game accept, game quit, and game reset board move is "board move" (null) (null) start prepare is "start prepare" (null) (null) - The server should determine from "start prepare" who is playing as X, and who is O. The client wo accepted the game should send what it is playing as. Ex. It sends O, so the server sends X to the other client. C > S 0x09 (channel refresh request) = none - This packet can be sent to the server when you want to request a channel list update. S > C 0x09 (channel refresh) = - This packet is sent to you when the server requests a client userlist update (I.E. re-arranging the userlist for mods/admins [IRC style]). S > C 0x0A (fresh account creation) = none - If you log onto the server with an account that hasn't been created, this message will be sent to you. C > S 0x0B (Keep alive packet) = none - Lets the server know you are still connected, otherwise it will disconnect your socket. S > C 0x0B (Request keep alive packet) = none - Keeps the sockets fresh, and without any chance of getting disconnected. You must reply to this, or the server will disconnect you. C > S 0x0C (Request to join channel) = (null) - When you want to join a channel, send this packet, and the server will determine if you can join or not. S > C 0x0C (User left channel) = - When a user leaves your channel, this packet is sent. S > C 0x0D (Channel join status) = (null) - When you attempt to join the specified channel, the server will return to you the name of the channel, plus the status on whether or not you could enter. Statuses: [list] [*]restricted [*]success [/list] C > S 0x0E (Whisper to user) = (null) (null) - When you whisper a user "/whisper " You send this packet. S > C 0x0F (User joined channel) = - If any users exist in the channel the user joined, a message will be sent to all the clients in that channel, saying the user joined it. C > S 0x10 (Ignore user request) = - This packet is simply sent when you wish to ignore a user on VectorNet. S > C 0x10 (Ignore user response) = - The status on whether the user was ignored or not is sent back. The results can be one of two things: [list] [*] = Returned successful. You may now add the user to whatever block list you have [*]%NULL% = The user does not exist on VectorNet [/list] C > S 0x11 (Statistics request) = none - If you want to retrieve various statistics on vectornet, send this packet. S > C 0x11 (VectorNet statistics response) = <# of users on VectorNet> (null) <# channels currently occupied on VectorNet> (null) - Returns various statistics on VectorNet. C > S 0x012 (VectorNet user dump request) = none - Requests a dump of all users on VectorNet for S > C 0x12. S > C 0x12 (Online user dump) = - The entire list of users is sent in this packet. I use it to test whether I whispered a user successfully or not in my client. S > C 0x13 (Shared Queue Message) = - This is a message sent to you from one of the other slaves, to be used as a bot command - You will only receive this packet if you signed in with ID 7