Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature_JS_Support_Library #49

Merged
merged 67 commits into from
Feb 25, 2024
Merged

Feature_JS_Support_Library #49

merged 67 commits into from
Feb 25, 2024

Conversation

zhiming99
Copy link
Owner

Continue the development of JS support library interrupted by issue #46.

@zhiming99 zhiming99 added the enhancement New feature or request label Jan 14, 2024
@zhiming99 zhiming99 self-assigned this Jan 14, 2024
@zhiming99 zhiming99 linked an issue Jan 14, 2024 that may be closed by this pull request
@zhiming99 zhiming99 added this to the Add-JS-Support-Library milestone Jan 14, 2024
…nc_p which

requires proxy code changes accordingly.
. sslfido.cpp, wsfido.cpp, wsfido.h: made the output message more clear to
distinguish between different handshakes.
. sslfido.cpp, wsfido.cpp, wsfido.h: made the output message more clear to
distinguish between different handshakes.
. rpcfg.py: fixed a bug 'Config WebServer' button does not work if the 'WS
installer' checkbox is not checked.
…copy when

adding a websocket frame header in the front of the data payload.
@zhiming99 zhiming99 linked an issue Jan 21, 2024 that may be closed by this pull request
…ion bug

introduced when adding config cache to save repeated parsing of json files,
which kept only one copy of interface configurations, and will be modified when
authentication is enabled, and caused the CRpcTcpBridgeAuth object created
afterwards having all its interfaces enabled before login succeeds, which shall
not be allowed. The solution is to make a copy of the matches from the cach for
each CRpcTcpBridgeAuth instance before making modifications to the matches.
…d by the

newly added RebuildMatches to CRpcTcpBridgeAuth and CRpcTcpBridgeProxyAuth
'ForwardRequest'.
. configdb.js, enums.js, proxy.js, dmsg.js: made some minor changes.
…g was not

serialized in the correct format.
. rpcroute.cpp: fixed a memory leak caused when adding duplicated remote-match.
It was not a problem till the EnableRemoteEvent was changed from
CIfTransactGroup to CIfTaskGroup, and the ChangeRelation did not work to stop
further actions when the match to add was found already added. So the solution
is to change back to CIfTransactGroup to get ChangeRelation work properly.
. defines.js, index.js, enablevt.js, fwrdreq.js, iomgr.js, proxy.js, bridge.js:
added synchronization for the requests of 'EnableRemoteEvent' to complete before
the 'Start' process ends, so that we can move on to send user requests. and
added code to stop the CInterfaceProxy gracefully. And continued adding code to
ForwardRequestLocal
…e.js,

dmsg.js: fixed some bugs to get request 'ForwardRequest' to work.
…string in

serialization/deserialization.
index.js, proxy.js, bridge.js: made modifications to make sure the startup promises
are completed in the expected sequence when handshake is failed.
… index.js: added

handler for the request 'ForwardEvent'.
. index.js, actcancel.js, asynctst.js, evtest.js: refacted index.js and splitted
to three test cases, actcancel, asynctst and evtest.
. enablevt.js, fwrdevt.js, iomgr.js, proxy.js: removed DispatchEventMsg from
proxy.js and directed the ForwardRevent event to ForwardEventLocal.
. bridge.js, fwrdreqrmt.js: fixed exception when ForwardRequest failed after
connection is lost.
. index.js, actcancel.js, evtest.js, asynctst.js: moved creation and start of
g_oIoMgr from the testcases to the index.js.
. actcancel.js, asynctst.js: fixed a bug the oContext was mistakenly shared
between and caused actcancel to cancel the task from asynctst, and failed.
…r side

socket, so that if the server binds to 0.0.0.0, the propDestIpAddr gives the
true ip address instead of this wildcard address.
KeepAlivesvr.h, katest/maincli.cpp: updated the outdated code with the latest
ridlc.
. enums.js: fixed a typo that propCallFlags and propCallOptions shared the same
value.
. enablevt.js, fwrdreq.js, iomsg.js, bridge.js: fixed a bug in CIoReqMessage
that the time counter m_dwTimeLeftSec was initialized or reset using the second
as the unit while the timer decrease this value with delta of milliseconds, and
caused the keepalive request to timeout quickly.
. fwrdreq.js, fwrdreqrmt.js: added support of one-way request
. fwrdevtrmt.js: fixed wrong handling of strRouterPath
. bridge.js: fixed a bug in OpenPortQueue, that stopped handling the pending
openport requests when found the port was already created.
. iomgr.js: fixed a bug, the m_mapProxies maps the portid to the proxy
instances, which is wrong since multiple proxy instances may share the same
portid, and the fix made a change to map the portid to a set of proxy instances.
@zhiming99
Copy link
Owner Author

I have finished half of the support library. Next I will move on to implement the stream related features.

console.log with DebugPrint from CInterfaceProxy, for better output.
commit. The iomgr's m_mapProxies was changed to be a map between portid and a
set of proxies, and the proxy's Stop was not updated and sent the
CloseRemotePort request directly to the webworker, which is not correct and
should let the iomgr to determine if all the proxies to the same port id are
released before it sends out the CloseRemotePort request to the webworker.
. actcancel.js: made a change to Stop the websocket after the request is
canceled.
…cancel.js:

made some changes to CInterfaceProxy's Start and Stop, to make the start/stop
process more reliable.
testcase with the latest ridlc.
. reqopen.cpp, bridge.cpp, : removed duplicated code.
. tcpfido.cpp, bridge.cpp: fixed crashes if the client sends ill-formed
OpenStream request to the rpcrouter.
. tcportex.cpp: replaced map erasing by key with erasing by iterator.
…s: added

handlers for 'FetchData' and 'OpenStream' requests.
. iomsg.js, cancelrq.js, enablevt.js, fwrdreq.js, keepalive.js, enablevtrmt.js,
actcancel.js, katest.js, asynctst.js: replaced 'propTimeoutsec' with
'propTimeoutSec'
. iomgr.js, fwrdreqrmt.js: fixed some bugs
…enums.js,

iomsg.js, iomgr.js, openstm.js, proxy.js, bridge.js, stmtest.js: added all the
stream related functions.
. configdb.js: added code to restore bytearray property to Buffer
. fwrdevt.js: added support for serialization protocol 'seriNone'
. openstmrmt.js: fixed a bug the fetchdata request's response was not genenrated
 correctly because of using 'undefined' req message instead of the right one.
…mwrite.js,

bridge.js, enablevtrmt.js, fwrdreqrmt.js, handshake.js, openstmrmt.js,
stream.js, stmtest.js: fixed some bugs to get stream's basic funtions to work
. stream.js: added error handling on test 'CanSend' failed.
. asynctst.js: eliminated the hanging promise.
. stmtest.js, webpack.config.js: make some minor adjustment
@zhiming99 zhiming99 merged commit f3d362d into master Feb 25, 2024
5 checks passed
@zhiming99 zhiming99 deleted the Feature-JS-Support-Library branch February 26, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpcfg.py cannot config the webserver successfully. Add language support for Javascript
1 participant