UIOCPPnp protocol

UIOCPPNP is a protocol based on UPnP protocol that allows applications to present on a network IOCP is 'self-identify' and 'autoconfigure'. The idea is that each client can find the server you need without the user having to 'modify' any configuration file.

For many years, users of flight simulators have been calling auto systems, uIocpPnp gives the response to this request.

How it works:

1) Each server or client that is 'connected' to a network (even on localhost environment) sends a message called DISCOVER the whole network.

2) This message is picked up by all clients or servers that support this protocol network that are listening, even just send that DISCOVER is received.

3) In response to a DISCOVER received, each client or server responds with a message called NOTIFYIN. This message notifies the presence of server or client on the network.

4) Every client or server receives all NOTIFYIN, including their own, and stored in a list the presence of all others.

5) When a client or server leaves the network, send NOTIFYOUT that makes the rest of clients or servers removed it from the list we had saved.

6) All clients and servers use the UDP network protocol on port 8118. Since multiple clients and servers can be on the same PC the socket must be open to options and SO_REUSEADDR SO_BROADCAST.

There are two additional messages now obsolete that are GetStatus and SetStatus.

Message Structure:


DISCOVER * {VERSION}0x0d0x0a
Example: DISCOVER * UIOCPPNP/1.1\r\n


NOTIFYIN * {VERSION}\r\nModule-Type:{sType}\r\nModule-Version:{sVersion}\r\nModule-Alias:{sAlias}\r\nServer-Port:{nPort}\r\nUIocpPnp-Serial:{sSerial}\r\nOs:{sOs}\r\n

VERSION  = "UIOCPPNP/1.1"
sType  = String with IOCP client or server type. Example: IOCPServer sends IOCPServer, and GaugeComposer sends GaugeComposer.
sVersion = Version of IOCP client or server. Example, IOCPServer sends 2.3 and GC sends 2.0
sAlias  = Identifier that is running the IOCP client or server. ex IOCPServer can send FS2004 or FSX. 
nServerPort = The server sends the port number in treating the IOCP. The IOCP client sends 0.
sSerial  = Three 5-digit random numbers (filled with 0) separated by hyphens. With the way 00000-00000-00000.
sSOS  = Identificador de Sistema Operativo del cliente. See below. (*)


NOTIFYOUT * {VERSION}\r\nUIocpPnp-Serial:{sSerial}\r\n
VERSION  = "UIOCPPNP/1.1"
sSerial  = Three 5-digit random numbers (filled with 0) separated by hyphens. With the way 00000-00000-00000.


FINISH * {VERION}\r\n
VERSION  = "UIOCPPNP/1.1"


(*) Operating System:
"%02d/%02d.%02d/%04d"
dwPlatformId    =
dwMajorVersion  =
dwMinorVersion  =
dwBuildNumber =

In C++:
OSVERSIONINFO osVersionInfo;
osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
char sOS[20];// = "00/00.00/0000";
if (GetVersionEx(&osVersionInfo))
sprintf(sOS,"%02d/%02d.%02d/%04d",osVersionInfo.dwPlatformId,osVersionInfo.dwMajorVersion,osVersionInfo.dwMinorVersion,osVersionInfo.dwBuildNumber);
else
sprintf(sOS,"%02d/%02d.%02d/%04d",0,0,0,0);
g_sSOS = _strdup(sOS);

 

 

IocpServer uIocpPnp

Powered by ENCORE SOLUTIONS tm 2009