On Thu, 30 Jun 2022 19:28:30 +0200, R.Wieser wrote:
Hello all,
I'm trying to create some basic LPC code, but am running in a bit of a problem in regard to how NtAcceptConnectPort works. :-(
I've got some server-side code which uses the following functions in the below order :
NtCreatePort
NtListenPort
NtAcceptConnectPort
NtCompleteConnectPort
NtReplyWaitReceivePort
....
On the client side I'm calling NtConnectPort twice (with some data identifying each connection), to test opening two connections to the server.
The problem is that although I'm calling NtReplyWaitReceivePort with the data-port handle returned from NtAcceptConnectPort the second connect requests data is received by NtReplyWaitReceivePort.
Which, to me, is quite unexpected. It is as if the data-port handle is absolutily ignored ...
Could someone explain to me how the above works / how I can make multiple connections to the server-side program ?
Regards,
Rudy Wieser
Those functions are not meant for user applications. There're network level functions used for RPC much like FTP or HTTP, which don't yet include information regarding the source and destination applications.
While the client part of it can be used for user applications, the server
part while it's possible, it should not be used - as there can only be one effective listener, since RPC data is not sent using network broadcast.
IOTW, only one listener will receive the data.
If the server part is used by user application, it may interfere with the
RPC server. Making some data not received by the RPC server.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)