Functions of ballerina.net.ws package
function addConnectionToGroup(string connectionGroupName)
This pushes text from server to all the connected clients of the service.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionGroupName | string | Name of the connection group |
function broadcastText(string text)
This pushes text from server to all the connected clients of the service.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
text | string | Text which should be sent |
function closeConnection()
Close the current client connection
Parameters:
Parameter Name | Data Type | Description |
---|
function closeConnectionGroup(string connectionGroupName)
Close all the connections in connection group.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionGroupName | string | Name of the connection group |
function closeStoredConnection(string connectionName)
Close stored connection.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionName | string | Name of the connection |
function pushText(string text)
This pushes text from server to the the same client who sent the message.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
text | string | Text which should be sent |
function pushTextToConnection(string connectionName, string text)
Push text to the connection chose by the user from the connection store.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionName | string | Name of the connection |
text | string | Text which should be sent |
function pushTextToGroup(string connectionGroupName, string text)
Push text from server to all the connected clients of the service.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionGroupName | string | Name of the connection group |
text | string | Text which should be sent |
function removeConnectionFromGroup(string connectionGroupName)
Removes connection from a connection group.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionGroupName | string | Name of the connection group |
function removeConnectionGroup(string connectionGroupName)
Removes connection group.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionGroupName | string | Name of the connection group |
function removeStoredConnection(string connectionName)
Removes connection from a connection store.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionName | string | Name of the connection |
function storeConnection(string connectionName)
Store the connection globally for the use of other services.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
connectionName | string | Name of the connection |
Annotations of ballerina.net.ws package
annotation OnClose
Attributes:
Attribute Name | Data Type | Description |
---|
annotation OnOpen
Attributes:
Attribute Name | Data Type | Description |
---|
annotation OnTextMessage
Attributes:
Attribute Name | Data Type | Description |
---|