User Tools

Site Tools




void netPrint(u8 socketNum, char *formatString[, arg0, …, argn])

socketNum : The socket number (0~3)
formatString: A character string to be printed that can optionally contain format specifiers
arg0,…,argn: An optional set of arguments to be used by format specifiers.
Returns 1 if successful, 0 otherwise

Sends a character string, formatString, out socket, socketNum. The format string can optionally contain format specifiers just like the printf function. A connection must be established (SOCK_ESTABLILSHED) to send data.

u8 lucky = 7;
netPrint(0, "%d is a lucky number", lucky);

Network sample program

go MOACON home

moacon/netprint/index.txt · Last modified: 2016/04/14 11:07 (external edit)