Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
TDx_Play_Library v2.00 Component Reference
|
|
[ TDx_Play::SendEx() ]
[ next: SetGroupConnectionSettings() ]
[ prev: SendChatMessage() ]
public:
virtual bool __fastcall SendEx( DPID pFrom, DPID pTo, dword pFlags, void* pData, dword pDataSize, dword pPriority, dword pTimeout, void* pContext, dword* pID );
TDX_PLAY::SENDEX()
[ component method ]
- Description
The
SendEx
method
will
send
guaranteed
or
unguaranteed
messages
to
individual
or
multiple
players.
It
functions
like
TDx_Play::Send()
except
asyncronous
messages,
message
priorities
and
message
timeouts
are
all
supported.
When
using
asynchronous
messaging,
DPERR_PENDING
will
be
returned
once
the
message
is
queued
and
a
DPMSG_SENDCOMPLETE
message
received
once
the
send
process
is
completed.
System
messages
will
always
be
sent
guaranteed.
An
encypted
or
signed
message
is
sent
as
a
system
message
(DPMSG_SECUREMESSAGE).
There
is
no
message
size
limit,
large
messages
will
be
broken
into
packets.
It
is
reccomended
large
messages
be
sent
guaranteed,
as
one
lost
packet
on
an
unguaranteed
message
will
result
in
the
entire
message
being
discarded.
The
largest
message
sendable
using
a
single
packet
can
be
determined
by
checking
the
TDCaps::MaxBufferSize
value
returned
by
TDx_Play::GetCaps().
It
is
reccomended
that
all
secure
or
signed
messages
be
sent
with
the
same
priority
level.
Secure
message
validation
depends
on
receive
order,
and
different
priorities
may
change
that
order.
Error
values
that
can
be
generated
are:
DPERR_BUSY
DPERR_CONNECTIONLOST
DPERR_INVALIDFLAGS
DPERR_INVALIDPARAMS
DPERR_INVALIDPLAYER
DPERR_INVALIDPRIORITY
DPERR_NOTLOGGEDIN
DPERR_SENDTOOBIG
DPERR_UNSUPPORTED
- Parameters
From
The From parameter identifies the local player sending the message.
To
The To parameter identifies the player or group receiving the message if this method return successfully.
DPID_ALLPLAYERS can be specified to send the message to all players in the session, or DPID_SERVERPLAYER to send a message to the server player of a client server session.
Flags
The Flags parameter defines flags indicating how the message is to be sent.
The described effect applies when the flag is set.
The default value of zero will result in a nonguaranteed message being sent.
DPSEND_ASYNC
Send the message asynchronously.
The method returns immediately, DPERR_PENDING being returned if the message was added to send queue (rather than being sent straight away).
A DPMSG_SENDCOMPLETE message will be posted to the senders receive queue once the message has been sent.
DPSEND_ENCRYPTED
Send the message as a DPMSG_SECUREMESSAGE system message with encryption.
Only usable in a secure session with DPSEND_GUARANTEED also set.
DPSEND_GUARANTEED
The message is to be sent using guaranteed delivery if available.
DPSEND_NOSENDCOMPLETEMSG
No DPMSG_SENDCOMPLETE message will be posted when sending an asynchronous message.
DPSEND_ASYNC must also be set.
DPSEND_SIGNED
Send the message as a DPMSG_SECUREMESSAGE system message with a digital signature.
Only usable in a secure session with DPSEND_GUARANTEED also set.
Data
The Data parameter references the message data that is to be sent.
DataSize
The DataSize parameter defines the size, in bytes, of the message data to be sent.
Priority
The Priority parameter defines a message priority, from lowest priority at zero to highest priority at 65535.
Messages are sent from the queue in priority order.
Setting a priority (non zero) when the service provider does not support them results in a DPERR_UNSUPPORTED error.
Use TDx_Play::GetCaps() to determine if priority messaging is supported.
Timeout
The Timeout parameter defines how long, in milliseconds, to wait before cancelling the message if it still has not been delivered.
A DPMSG_SENDCOMPLETE message will still be posted when a message times out.
Setting a timeout (non zero) when the service provider does not support them results in a DPERR_UNSUPPORTED error.
Use TDx_Play::GetCaps() to determine if timouts are supported.
Context
The Context parameter references application defined data to be returned in the completion message when the send is complete.
Set NULL if no data needs to be returned.
ID
The ID parameter will reference the identity assigned to an asynchronous message if the method returns successfully.
The message ID can be used to check the message status or cancel it.
Set NULL if no message ID is required.
- See Also
- Top
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
|
|