Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [Tier 2] TCP client Socket Example and Screencast

Author
Message
Proteus
22
Years of Service
User Offline
Joined: 4th Oct 2002
Location: The Future
Posted: 26th Jul 2012 23:19 Edited at: 26th Jul 2012 23:23
Hello everyone,

Story (skip-able):
This is Diego "Proteus" Spinola (The hardware guy from hackeneering.com). Earlier this week I've decided to buy AppGameKit to use it as an interface to control a product we're cooking up. Since most of this project resides on the "embedded hardware world" we developed our own IPC protocol (binary message based protocol for inter process communication) to get the most out of our hardware. In the process of porting our protocol I'm creating a few Tier 2 Socket usage examples for the undocumented classes available on AppGameKit and since I think that this might help people i'll be posting them as I go...

First example ("RAW"-TCP Socket Client connecting to a server):
- to fully "enjoy" this piece of code you should get http://realterm.sourceforge.net/ installed on a windows machine
- The Sample Code is Attached to this post
- A Demo screencast: http://youtu.be/U_A4r_5Nqp4?hd=1



Diego "Proteus" Spinola
Electrical Engineer
Emphasis on Computer and Digital Systems Engineering

Attachments

Login to view attachments
Pilz X Schizo
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Massachusetts, USA
Posted: 26th Jul 2012 23:56
That is neat, need to go try this stuff out now . Thank you for sharing.
MarcoBruti
13
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 26th Jul 2012 23:59
very interesting example. Thanks also for letting us know the existence of Realterm: it is very cool too to debug protocol communications.
Since I use only Tier-1 (my choice, I know how to program in Java and C++), I would be interested to know if such AppGameKit socket could be used also in Tier-1 to customize client/server intercommunication. But I think that only TGC could answer.
Proteus
22
Years of Service
User Offline
Joined: 4th Oct 2002
Location: The Future
Posted: 27th Jul 2012 01:39
@Pilz X Schizo : You are welcome =)

@MarcoBruti: Yeah, Realterm is a relly nice tool for monitoring and debugging protocols (you can also use the Echo Port feature to make it behave as a "man in the middle" which is also nice for debugging/reverse engineering , not as sophisticated as wireshark but it does a good job )

and now for a Second Example (Server Sockets using the cNetworkListener class (server socket equivalent) ):
-now we switch gears, the AppGameKit app is now the server and realterm is going to be our client
-1 client at a time for the sake of simplicity
-I was coding a tiny HTTP server but ran out of time so , maybe next time

see attached code

Diego "Proteus" Spinola
Electrical Engineer
Emphasis on Computer and Digital Systems Engineering

Attachments

Login to view attachments
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 28th Jul 2012 04:41
Excellent job sir.

Login to post a reply

Server time is: 2024-11-23 20:08:50
Your offset time is: 2024-11-23 20:08:50