WebWindowHandle

WebWindowHandle

new WebWindowHandle()

Client communication handle for RWebWindow.

Description:
Source:

Methods

canSend(numsendopt)

Checks number of credits for send operation

Source:
Parameters:
Name Type Attributes Default Description
numsend number <optional>
1

number of required send operations

Returns:

true if one allow to send specified number of text message to server

cleanup()

Cleanup and close connection.

Source:

close()

Close connection

Source:

getChannelId()

Returns used channel ID, 1 by default

Source:

getRelCanSend()

Returns number of possible send operations relative to number of credits

Source:

getUserArgs(fieldopt)

Returns arguments specified in the RWebWindow::SetUserArgs() method

Description:
  • Can be any valid JSON expression. Undefined by default.

Source:
Parameters:
Name Type Attributes Description
field string <optional>

if specified and user args is object, returns correspondent object member

Returns:

user arguments object

isConnected()

Returns true if socket connected

Source:

resizeWindow()

Request server to resize window

Description:
  • For local displays like CEF or qt5 only server can do this

Source:

send(msg, chidopt)

Send text message via the connection.

Source:
Parameters:
Name Type Attributes Description
msg string

text message to send

chid number <optional>

channel id, 1 by default, 0 used only for internal communication

setReceiver(obj)

Set callbacks receiver.

Source:
Parameters:
Name Type Description
obj object

object with receiver functions

Properties
Name Type Description
onWebsocketMsg function

called when new data receieved from RWebWindow

onWebsocketOpened function

called when connection established

onWebsocketClosed function

called when connection closed

onWebsocketError function

called when get error via the connection

setUserArgs()

Set user args

Description:
  • Normally set via RWebWindow::SetUserArgs() method

Source: