Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1449

VB6 WebSocket-PushServer-Demo

$
0
0
This Demo shows, how one can "connect a Browser-GUI" to an existing Desktop-App
("Desktop-App-remoting" - e.g. from any given mobile-device via WLAN-IPs in the URL of their mobile-Browsers)

It depends on the cWebServer-implementation of either the RC5 or RC6 package.
(the Project references RC6 - but is switchable to vbRichClient5-reference and should then work the same way).

It is able to run directly in the IDE, starting-up a webserver-instance,
which then listens on the loopback-interface "127.0.0.1" and Port 8080 by default.

A new Browser-instance (-Tab) of your currently installed default-Browser can be shelled directly from this "Server-Form".
(with the correct URL which matches your current IP and Port-Settings).

The Server-App stands for your own "Desktop-App" (and what it could support with regards to "Browser-remoting").
It has currently implemented a little WebAPI-interface which allows:
- two simple JSON-based Ajax-RPC-calls (to show "Browser-initiated Param-transport and -requests)
- but it also allows a Browser-initiated "Subscribing to two ServerPush-Channels" (Server-initiated Data-Pushing to the Browser-Clients)
1) a simple "current ServerTime push-channel"
2) a simple "Chat-channel", which allows:
2.1) a Message-Reflection (at the serverside) for client-initiated Chat-Message to all connected Clients
2.2) a Server-initiated Chat-Message (via Button on the Server-Form) which is transported to all connected Clients as well

Here is the Demo-Code:
WebSocketPushServer.zip

Have fun,

Olaf
Attached Files

Viewing all articles
Browse latest Browse all 1449

Trending Articles