package
0.0.0-20210805150241-449d0e09d70b
Repository: https://github.com/project-flogo/websocket.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

WebSocket Proxy

The ws service type accepts a websocket connection and backend url. It establishes another websocket connection against supplied backend url and acts as a proxy between both connections. This service doesn't produce any outputs as it runs proxy instance in the background and returns immediately.

The service settings for the request are as follows:

NameTypeDescription
uristringBackend websocket uri to connect
maxConnectionsnumberMaximum allowed concurrent connections(default 5)

Available input for the request are as follows:

NameTypeDescription
wsconnectionconnection objectWebsocket connection object

A sample service definition is:

{
    "name": "ProxyWebSocketService",
    "description": "Web socket proxy service",
    "ref": "github.com/project-flogo/websocket/activity/wsproxy",
    "settings":{
        "uri": "ws://localhost:8080/ws",
        "maxConnections": 5
    }
}

An example step that invokes the above ProxyWebSocketService service using wsconnection is:

{
    "service": "ProxyWebSocketService",
    "input": {
        "wsconnection":"=$.payload.wsconnection"
    }
}