IOCP Protocol
Before diving with the protocol let me make a few comments that I think fit.
In the format described below: a character between single quote that means, a character, and value is the specified character, and '' is the same as $ 20, or 32, or space.
NOTE: ... (three dots) means an undetermined No character (in logical order) as the packet that's showing.
0.- IOCP is a text-mode protocol, readable, uncoded.
1.- IOCP was designed to UDP, not TCP, but IOCPServer uses TCP. (See 12)
2.- Is based on a client-server architecture. Clients register for the server to know what everyone wants. So when something changes are automatically notifies clients.
3.- The variables are integers. The need for decimal is resolved by applying a correction factor.
4.- All IOCP messages finish with two characters , 13 and 10. $ 0D and $ 0A, ie the sequence CR + LF line ending. In the rest of this page is indicated as CL
5.- All IOCP record types sequence beginning with "Arn." The first 4 octets (bytes) of each record are 'A', 'r', 'n', '.'
6.- The first message occurs after the client connection to the server. It consists of a message that the server informs the client 'with whom he is connected' to the client acted upon. This message is Arn.TipoSer: xxxxxx: CL where xxxxxxx is the name of the server.
For example, when a client connects to FS IOCPServer, given the sequence:
where 'n' should be interpreted as a digit indicating the version of FS and the 1.6 IOCPServer can deliver 7, 8 and 9 in that position for FS98, FS2000 and FS2004 respectively. FSX should be shipped to an A. That is, "Arn.TipoSer: FSA: CL
7.- The client must register after knowing which server is connected. Communication with the server starts with the IOCP message: Arn.Inicio: var0: var1 :...: varn: CL where var0, varn var1 to represent the number of variables that the client wants to be informed if they change.
8.- When clients or server want to end the communication sends an IOCP message to another type "Arn.Fin: CL"
NOTE: To close the communication, the IOCPServer sends an Arn.Fin: CL to all clients who are online and waiting a while, discarding possible "Arn.Fin: CL" issued to clients close.
9.- (Only IOCPServer) The IOCPServer understands and responds to a special IOCP message called Arn.Preg. The client tells the server that wants to know the value of a variable lead time but without change. So any client to be connected to an IOCPServer can implement the request for a fact, even if it have not registered, and ask the server for the settings you want. The format is: "Arn.Preg: var0: var1 :...: varn: CL
10.- The server must generate a message like: "Arn.Resp: var0 = val0: var1 = val1 :...: varn = Valner: CL" after receiving a start message, a message or when a variable Arn.Preg, that the customer is registered, it changes. Where var0, var1, Varna represents the number of variable registers (or questions) and val0, val1 to Valner, represents its value on the server.
11.- When a customer wishes to inform the server to change the value of some variable, the server sends the same message as above, the "Arn.Resp: var0 = val0: var1 = val1 :...: varn = Valner: CL "where var0, var1, Varna represents the number of variable records and val0, val1 to Valner, represents its value for the server to change it.
NOTE: Sometimes, the simulator accepts the variable, but then, usually about 150ms, the variable value changes again and is left untouched. The server will notify it to the client. Later, the customer receives confirmation of the change first and get some ms after the value has fallen in the variable.
12.- IOCPServer do not emit "Arn.Vivo: CL. It responds with an identical message if it receives, but not issued. State control of the client is done using TCP.
13.- (Only IOCPServer) The IOCPServer may respond to another message, the "Arn.Key: nnn: CL. This corresponds to a customer request for the FS "shoot" one of their events. The list of values can be downloaded from the website of IOCPServer.
where nnnn is an event to shoot, can be a key, or many other things ....














