[Gambas-user] Gambas3, ServerSocket and SSL support

Alexie ualex73 at ...626...
Fri Sep 25 18:15:50 CEST 2015


Hi All,

Gambas3 has a lot of networking features, including acting like a (Web)
Server. Only thing what is lacking is SSL support and IPv6 (separate topic
:-)) ... I made some code for DomotiGa, to support SSL in the ServerSocket.
I basically create a wrapper around the ServerSocket and Socket, called the
'CServerSocket.class' and 'CSocket.class'. They resemble almost the same
features/parameters/events of the original classes ... Including native
support for HTTP and WebSocket, so you don't have to decode/parse it
yourself - you get directly the good data with a read event ... It has been
tested on Ubuntu and Raspbian devices. Also I have done some benchmarking
and didn't notice impact on performance.

Attached is the code, including an example to use the 'new'
CServerSocket.class and CSocket.class.

Just let me know if you like it or find bugs!

Regards,
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SSL-Example.tar.gz
Type: application/x-gzip
Size: 18816 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150925/62ff1763/attachment.bin>


More information about the User mailing list