Link Search Menu Expand Document is a Socket.IO server implementation for the Lucee webserver. Socket.IO is a javascript library for realtime web applications. You can use the project to marry your Lucee server with your frontend client(s) using the Socket.IO client library.

The project is currently in an ALPHA state. This means it is suitable for experimenting with, but unlikely that it is ready for production use. We have implemented much of the core feature set, but there is much to do to ensure that we have a robust, performant and feature complete set.

A note on Socket.IO version compatibility

Important note: The project currently supports up to version 2.3.1 of the Socket.IO client. Version 3.0.0 has very recently been released (as of November 2020) and we will need to wait for downstream project updates before we can tackle the upgrade.

Getting started

We recommend you follow the installation guide and getting started tutorial. However, below is a super-brief outline of how you use the project:

Lucee code

// create and start the embdeed Socket.IO server
io = new socketiolucee.models.SocketIoServer();

// listen to default namespace connection events and send an event to any sockets that connect
io.on( "connect", function( socket ){
	socket.send( "Hello world from Lucee @ #Now()#" );
} );

Frontend client

<!DOCTYPE html>
	<title> Hello world</title>
	<script src="" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
	<script src=""></script>
		// connect to our server
		var socket = io( "" );

		// listen to the message event and output the message
		socket.on( 'message', function( message ){
			$( "#output" ).append( $( "<p>" + message + "</p>" ) );
		} );
	<div id="output"></div>