WSPutData (C Function)
-
See Also
- C Functions
- WSPutType()
- WSPutArgCount()
- WSPutSize()
- Related Guides
- Tech Notes
WSPutData (C Function)
int WSPutData(WSLINK link,const char *b,int count)
puts count bytes from the buffer b to the WSTP connection specified by link.
Examples
Basic Examples (1)
#include <string.h>
#include "wstp.h"
/* send "Hello World!" to a link */
void f(WSLINK lp)
{
if(! WSPutNext(lp, WSTKSTR))
{ /* unable to put type WSTKSTR to lp */ }
if(! WSPutSize(lp, strlen("Hello World!"))
{ /* unable to put the length of "Hello World!" to lp */ }
if(! WSPutData(lp, "Hello World!", strlen("Hello World!")))
{ /* unable to put the data "Hello World!" to lp */ }
}
See Also
C Functions: WSPutType() WSPutArgCount() WSPutSize()
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)