Posted on: 7/15/2013 8:50:19 PM | Views : 566

The Goal
Get an unmanaged user application (the "server" in a client-sever relationship) to multiple web clients via websockets, IIS8, a custom ASHX, and several MemoryMappedFile objects.

The Story So Far...
An legacy unmanaged user application (written in Delphi) loads up a C# assembly (WebTransport.DLL) through C++/CLI. IIS 8 serves up a custom ASPX page, which contains javascript to connect a websocket to 'websocket.ashx'. This custom ASHX works great, and also loads WebTransport.DLL to allow communication back to the user application. WebTransport.DLL uses two C# MemoryMappedFile objects (one send, one receive) to communicate between the two parties. One instance of this object is created per client, with the potential for dozens of concurrent clients. The relevant portions of WebTransport.DLL are simply the opening of the MemoryMappedFile objects...< ...

Go to the complete details ...