Result = SendNetworkString(Connection, String$ [, Format])Description
Send a string to the specified client. This function can be used by both client and server applications.
Connection The connection to send the string to. On the server side, 'Connection' is the client which should receive this data. On the client side, 'Connection' is returned by OpenNetworkConnection(). String$ The string to send. Format (optional) The string format to use when sending the string. This can be one of the following values:#PB_Ascii : sends the strings as ASCII #PB_UTF8 : sends the strings as UTF8 (default) #PB_Unicode: send the strings as unicode
Returns the number of bytes sent.
SendNetworkString() provides a solution to quickly send strings. The string will be sent without the terminating null-character, and can be received using ReceiveNetworkData(), after NetworkServerEvent() / NetworkClientEvent() returned #PB_NetworkEvent_Data). In unicode mode the string is sent as UTF-8, which is processor independent (unlike UTF-16 which is tied to processor endianness). There is no ReceiveNetworkString() command.