
MyName property
Holds user defined identity ID of local devP2P peer.
Type
String.Syntax
- C#
- C++
- VB.NET
void devP2P.SetMyName(IntPtr Handle, string Value);
The MyName(Handle,value) syntax has these parts:
void devP2P.GetMyName(IntPtr Handle, StringBuilder buffer);
The MyName(Handle) syntax has these parts:
The MyName(Handle,value) syntax has these parts:
Handle | Reference to the devP2P instance. |
value | Buffer with new name for local peer. |
void devP2P.GetMyName(IntPtr Handle, StringBuilder buffer);
The MyName(Handle) syntax has these parts:
Handle | Reference to the devP2P instance. |
Return value | Current name for local peer. |
char *MyName = value;
The MyName(value) syntax has these parts:
The MyName(value) syntax has these parts:
value | Pointer to allocated memory where local name is stored. |
Sub P2P_SetMyName(ByVal Handle As IntPtr, ByVal Value As String)
The MyName(Handle,value) syntax has these parts:
Sub P2P_GetMyName(ByVal Handle As IntPtr, ByVal buffer As StringBuilder)
The MyName(Handle) syntax has these parts:
The MyName(Handle,value) syntax has these parts:
Handle | Reference to the devP2P instance. |
value | Buffer with new name for local peer. |
Sub P2P_GetMyName(ByVal Handle As IntPtr, ByVal buffer As StringBuilder)
The MyName(Handle) syntax has these parts:
Handle | Reference to the devP2P instance. |
Return value | Current name for local peer. |
Remarks
MyName property holds ID that is shown to remote side upon successful connection. Value isn't really important, it's just basic exchanged information about peers when they connect, so you know in LinkDone event that you actually got connected to peer you wanted to. However, to be 100% sure in remote peer's identity, you should use same secret password on both sides since complete traffic is encrypted with it.However, if Search method is used, MyName can be very important since it announces your ID to the mediator - and remote peer will search for you using that ID value. Note that devP2P will remember this property through address reference, so keep your buffers static and valid as long as devP2P needs it. devP2P will not free or touch allocated memory in any way.
Platforms
WindowsMac OSX
Linux
BSD