netWriteTCPString

Sends a string over a TCP connection. Takes a handle (Int) and string (String). Returns the number of bytes sent, or 0 if string is NULL (Int).

Network

Parameters & Returns

Parameters

handle Int
str String

Returns

Int

Quick Summary

Sends a string over a TCP connection. Takes a handle (Int) and string (String). Returns the number of bytes sent, or 0 if string is NULL (Int).

Technical Exegesis...

Convenience function that sends a null-terminated string over a TCP connection. Calculates the string length using strlen and calls netWriteTCPStream to send the data. Returns the number of bytes sent, or 0 if str is NULL.

Does NOT send the null terminator - only the string characters. Wrapper around netWriteTCPStream for easier string sending. Useful for text-based protocols and simple string messaging.

Example

Example.bam
; No example implemented yet