How to send a message to a listener
For network communication testing purposes we recommend the Freeware
Hercules SETUP utility https://www.hw-group.com/software/hercules-setup-utility
Possible listener protocol types are :
- TCP
- UDP
- TLS
Example:
int main(void)
{
int sd = copen(TCP,"127.0.0.1",4711,1000);
if(cconnected(sd))
{
printf("Connection successfull\n");
/* write message to listener */
cwrite(sd,"Hello listener",strlen("Hello listener"),1000);
}
else
printf("connection failed\n");
cclose(sd);
return 0;
}