new WebWindowHandle()
Client communication handle for RWebWindow.
- Description:
Should be created with
connectWebWindow
function
- Source:
Methods
(private) addReloadKeyHandler()
Instal Ctrl-R handler to reload web window
- Description:
Instead of default window reload invokes
askReload
method WARNING - only call when you know that you are doing
- Source:
(private) askReload()
Ask to reload web widget
- Description:
If new key already exists - reload immediately Otherwise request server to generate new key - and then reload page WARNING - call only when knowing that you are doing
- Source:
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:
(private) connect(hrefopt)
Connect to the server
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
href |
<optional> |
optional URL to widget, use document URL instead |
(private) createChannel()
Method open channel, which will share same connection, but can be used independently from main If @param url is provided - creates fully independent instance and perform connection with it
- Source:
(private) createNewInstance()
Create new instance of same kind
- Source:
getChannelId()
Returns used channel ID, 1 by default
- Source:
(private) getConnArgs()
provide connection args for the web socket
- Source:
(private) getHRef(relative_pathopt)
Return href part
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
relative_path |
string |
<optional> |
relative path to the handle |
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
(private) inject()
Inject message(s) into input queue, for debug purposes only
- Source:
(private) invokeReceiver()
Invoke method in the receiver.
- Source:
isConnected()
Returns true if socket connected
- Source:
(private) keepAlive()
Send keep-alive message.
- Description:
Only for internal use, only when used with web sockets
- Source:
(private) markQueueItemDone()
Provide data for item which was reserved before.
- Source:
(private) processQueue()
Process completed messages in the queue
- Source:
(private) provideData()
Provide data for receiver. When no queue - do it directly.
- Source:
(private) reserveQueueItem()
Reserve entry in queue for data, which is not yet decoded.
- 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 |
(private) sendLast()
Send only last message of specified kind during defined time interval.
- Description:
Idea is to prevent sending multiple messages of similar kind and overload connection Instead timeout is started after which only last specified message will be send
- Source:
(private) setHRef(pathopt)
Assign href parameter
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
path |
string |
<optional> |
absolute path, when not specified window.location.url will be used |
setReceiver(obj)
Set callbacks receiver.
- Source:
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
obj |
object | object with receiver functions Properties
|
setUserArgs()
Set user args
- Description:
Normally set via RWebWindow::SetUserArgs() method
- Source:
(private) storeKeyInUrl()
Replace widget URL with new key
- Source: