
TextReceived event
Fires when text message arrives from remote side.
Syntax
- C#
- C++
- VB.NET
delegate void devP2P.TextReceivedEvent(IntPtr Handle, int chanid, string text);
The TextReceived(Handle,chanid,text) syntax has these parts:
The TextReceived(Handle,chanid,text) syntax has these parts:
Handle | Reference to the devP2P instance. |
chanid | Index of the channel where data arrived. |
text | String that was received from remote peer. |
void TextReceived(CP2P *p2p, int chanid, char *text);
The TextReceived(p2p,chanid,text) syntax has these parts:
The TextReceived(p2p,chanid,text) syntax has these parts:
p2p | Pointer to devP2P instance that fired the event. |
chanid | Index of the channel where data arrived. |
text | Pointer to buffer in memory with the text. |
Delegate Sub P2P_TextReceivedEvent(ByVal Handle As IntPtr, ByVal chanid As Integer, ByVal text As String)
The TextReceived(Handle,chanid,text) syntax has these parts:
The TextReceived(Handle,chanid,text) syntax has these parts:
Handle | Reference to the devP2P instance. |
chanid | Index of the channel where data arrived. |
text | String that was received from remote peer. |
Remarks
TextReceived event is fired when remote side uses SendText method to send us short text message. On local side you can show this text to your application, or you can use it to send/receive various short commands between devP2P peers, so that you can make certain custom actions.If you want to send non-text (binary) data, use SendData method instead.
To use this event, you should implement function by yourself in the code (based on function declaration), and set devP2P.Events.TextReceived structure member to point to your function.
Platforms
WindowsMac OSX
Linux
BSD