All Projects → isapir → lucee-websocket

isapir / lucee-websocket

Licence: LGPL-2.1 license
Enables server WebSockets for Lucee via JSR-356 compliant servlet containers (e.g. Tomcat 8, Jetty 9.1, etc.)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to lucee-websocket

Arduinowebsockets
arduinoWebSockets
Stars: ✭ 1,265 (+7806.25%)
Mutual labels:  websocket-server
Ws Tcp Relay
A simple relay between WebSocket clients and TCP servers
Stars: ✭ 186 (+1062.5%)
Mutual labels:  websocket-server
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+1462.5%)
Mutual labels:  websocket-server
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+8606.25%)
Mutual labels:  websocket-server
Embedded Jetty Websocket Examples
Embedded Jetty WebSocket Examples
Stars: ✭ 159 (+893.75%)
Mutual labels:  websocket-server
Fiery
A flexible and lightweight web server
Stars: ✭ 203 (+1168.75%)
Mutual labels:  websocket-server
Esp32 Websocket
ESP-IDF WebSocket Component
Stars: ✭ 83 (+418.75%)
Mutual labels:  websocket-server
websocket-overlays
Websocket controlled Video Overlay server for OBS-Studio, XSplit, CasparCG, ProPresenter and everything with web browser.
Stars: ✭ 27 (+68.75%)
Mutual labels:  websocket-server
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+20868.75%)
Mutual labels:  websocket-server
Websocat
Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
Stars: ✭ 3,477 (+21631.25%)
Mutual labels:  websocket-server
Php Wss
Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
Stars: ✭ 117 (+631.25%)
Mutual labels:  websocket-server
Websocket
WSServer is a fast, configurable, and extendable WebSocket Server for UNIX systems written in C (C11).
Stars: ✭ 144 (+800%)
Mutual labels:  websocket-server
Ixwebsocket
websocket and http client and server library, coming with ws, a command line swiss army knife utility
Stars: ✭ 204 (+1175%)
Mutual labels:  websocket-server
Sandstone
PHP microframework designed to build a RestApi working together with a websocket server. Build a real time RestApi!
Stars: ✭ 98 (+512.5%)
Mutual labels:  websocket-server
Websocketd
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
Stars: ✭ 15,828 (+98825%)
Mutual labels:  websocket-server
Sketchpad
Sketchpad is fully customisable collaborative whiteboard plugin written in pure JavaScript.
Stars: ✭ 85 (+431.25%)
Mutual labels:  websocket-server
Swoft Im
基于swoft-cloud的微服务架构,最小化拆分粒度,PHP7、多进程、协程、异步任务、mysql连接池、redi连接池、rpc连接池、服务治理、服务注册与发现、Aop切面、全注解
Stars: ✭ 189 (+1081.25%)
Mutual labels:  websocket-server
lucee-dockerfiles
Official Lucee Dockerfiles for Docker Hub build images
Stars: ✭ 81 (+406.25%)
Mutual labels:  lucee
keker
Easy to use pub-sub message broker via websocket
Stars: ✭ 12 (-25%)
Mutual labels:  websocket-server
Cwebsocket
cWebsocket is lightweight websocket server library
Stars: ✭ 241 (+1406.25%)
Mutual labels:  websocket-server

Requirements

  • Java 8
  • JSR-356 Compliant Servlet Container, e.g. Tomcat 8, Jetty 9.1, etc.
  • Lucee 5.1.3.18

Installation

Update July 14th, 2017

Version 2.0.1 is out, and it fixes major issues but also adds to the installation process a bit. The new installation process is as follows:

  • If a previous version of the extension is installed -- Uninstall it
  • Install the extension from the Admin or by downloading the .lex file and dropping it in the deploy directory
  • Save the jar file servlet-filter-utils-1.1.1.jar to the classpath, e.g. if you're using Tomcat it can go into {tomcat}/lib, or if you're using Jetty then it can go into {jetty}/lib/ext
  • Add the following snippet to your web deployment descriptor (web.xml), be sure to modify the url-pattern to match your URLs that will used with WebSockets:
    <!-- Required for the Lucee WebSocket Extension !-->    
    <filter>
      <filter-name>HttpSessionInitializerFilter</filter-name>
      <filter-class>net.twentyonesolutions.servlet.filter.HttpSessionInitializerFilter</filter-class>
    </filter>

    <filter-mapping>
      <filter-name>HttpSessionInitializerFilter</filter-name>
      <!-- modify url-pattern to match your websocket endpoints !-->
      <url-pattern>/ws/*</url-pattern>
    </filter-mapping>
  • Restart the Servlet Container (e.g. Tomcat, Jetty, etc.)

Breaking Change

The function WebsocketRegister() has been renamed to WebsocketServer(). I hope to add a WebsocketClient() function soon so I wanted the names to make sense.


The easiest way to install the extension is from the Lucee Admin. Navigate to the Extension Applications page in the Web or Server Admin, e.g. /lucee/admin/server.cfm?action=ext.applications. Click the Lucee Websockets Extension icon, and then on the next page click the Install button.

Getting Started

The WebSocket API is event driven, meaning that you register event handling methods (e.g. onOpen(), onMessage(), etc), and those are called when the corresponding events are triggered.

To configure a WebSocket endpoint call the function

WebsocketRegister(String endpoint, Component listener):ConnectionManager

Where endpoint is the URI for the incoming WebSocket connections, e.g. /ws/chat/{channel}, and the Component listener is a component that implements any of the event handling methods as specified in the Listener Component API.

This should only be done once, so you can do that in Application.cfc's onApplicationStart().

Each endpoint has its own ConnectionManager object, which keeps track of all of the client WebSockets that are connected to that endpoint. You can either store the ConnectionManager in an Application scope variable, or retrieve it from a WebSocket object that is passed as as argument to some of the event handlers by calling the method getConnectionManager() on that argument, i.e. arguments.websocket.getConnectionManager().

Documentation and Tutorials

Check the WIKI for reference and documentation

Watch Getting Started Video Tutorial at:

Getting Started with Lucee WebSockets

Watch Chat Server Example Video Tutorial at:

Chat Server Example Video

Discussion

Please use Lucee Websockets Extension on Lucee Dev

Copyright / License

Copyright 2016-2017 Igal Sapir

This software is licensed under the Lesser GNU General Public License Version 2.1 (or later); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].