How
ScriptEZ.API wraps and unwraps data/messages for your sake ?
(1) Typology
for Named Pipe server in methods/properties calling: see an example
1.
Initialisation : |
Call to CreatePoolNamedPipeServerObject(…) to
instantiate a server and to wait for incoming connections (listening) |
2.
Incoming Connection (notification): |
onConnectionRequestNamedPipe(…) is called when
an incoming connection occurs. At this point, the server can optionally call
to AddNamedPipeClientObjectEventHandlers(…)
or can return 1, to accept the client request and delegate the
conversation between a NamedPipe client proxy object and the remote client. |
3. Conversation
(...) : |
onDataNamedPipe (…) is called for
each handle of NamedPipe proxy object
per client to deal with messages and responses, by calling to SendNamedPipeObjectData(…)
or SendNamedPipeObjectBinaryData(…) |
4. End
of conversation: |
onConnectionStateNamedPipe (…) is called for each handle of NamedPipe proxy object per client with a
description of a NamedPipe proxy object status ( closed or broken ), plus an
error number: |
5. End
of the server : |
The server object is destroyed when ScriptEZ.API
object is released or when the application exits. |
. Thread pooled Server .
Remote Client(s)
(2) Typology
for Named Pipe client in methods/properties calling: see an example
1. Initialisation : |
Call to CreateNamedPipeClientObjectEx(…) to
instantiate a client object |
2.
Outcoming Connection: |
Call to ConnectNamedPipeServerObject(…)
to initiate a connection with a
server. |
3. Accepted or Denied Connection (notification): |
onConnectionStateNamedPipe (…) is called and
provides a handle of NamedPipe client
object (hOwnerNamedPipe), with a description ( connected, refused or broken
), plus an error number: |
4.
Conversation (...): |
if a connection is
established, calls to SendNamedPipeObjectData(…) or SendNamedPipeObjectBinaryData(…)
will send data or messages to the server... |
5. End
of conversation: |
The conversation is terminated when ScriptEZ.API
object is released, the application exits or the server is gone. |