2011-01-22 12:51:57 +00:00
|
|
|
/*
|
|
|
|
* libwebsockets-test-client - libwebsockets test implementation
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Andy Green <andy@warmcat.com>
|
|
|
|
*
|
2016-02-08 08:46:05 +08:00
|
|
|
* This file is made available under the Creative Commons CC0 1.0
|
|
|
|
* Universal Public Domain Dedication.
|
2011-01-22 12:51:57 +00:00
|
|
|
*
|
2016-02-08 08:46:05 +08:00
|
|
|
* The person who associated a work with this deed has dedicated
|
|
|
|
* the work to the public domain by waiving all of his or her rights
|
|
|
|
* to the work worldwide under copyright law, including all related
|
|
|
|
* and neighboring rights, to the extent allowed by law. You can copy,
|
|
|
|
* modify, distribute and perform the work, even for commercial purposes,
|
|
|
|
* all without asking permission.
|
2011-01-22 12:51:57 +00:00
|
|
|
*
|
2016-02-08 08:46:05 +08:00
|
|
|
* The test apps are intended to be adapted for use in your code, which
|
|
|
|
* may be proprietary. So unlike the library itself, they are licensed
|
|
|
|
* Public Domain.
|
2011-01-22 12:51:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <getopt.h>
|
|
|
|
#include <string.h>
|
2013-02-11 14:32:02 +08:00
|
|
|
#include <signal.h>
|
2011-01-22 12:51:57 +00:00
|
|
|
|
2014-03-29 08:05:07 +01:00
|
|
|
#ifdef _WIN32
|
|
|
|
#define random rand
|
2015-12-09 07:10:03 +08:00
|
|
|
#include "gettimeofday.h"
|
2014-03-29 08:05:07 +01:00
|
|
|
#else
|
2015-12-09 07:10:03 +08:00
|
|
|
#include <syslog.h>
|
|
|
|
#include <sys/time.h>
|
2014-03-29 07:43:38 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
#include "../lib/libwebsockets.h"
|
|
|
|
|
2015-12-09 08:07:38 +08:00
|
|
|
static int deny_deflate, deny_mux, longlived, mirror_lifetime;
|
2015-12-09 07:10:03 +08:00
|
|
|
static struct lws *wsi_dumb, *wsi_mirror;
|
2015-12-09 08:07:38 +08:00
|
|
|
static volatile int force_exit;
|
|
|
|
static unsigned int opts;
|
2011-01-30 21:04:24 +00:00
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
/*
|
|
|
|
* This demo shows how to connect multiple websockets simultaneously to a
|
|
|
|
* websocket server (there is no restriction on their having to be the same
|
|
|
|
* server just it simplifies the demo).
|
|
|
|
*
|
|
|
|
* dumb-increment-protocol: we connect to the server and print the number
|
2011-01-27 06:26:52 +00:00
|
|
|
* we are given
|
2011-01-22 12:51:57 +00:00
|
|
|
*
|
|
|
|
* lws-mirror-protocol: draws random circles, which are mirrored on to every
|
2011-01-27 06:26:52 +00:00
|
|
|
* client (see them being drawn in every browser
|
|
|
|
* session also using the test server)
|
2011-01-22 12:51:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum demo_protocols {
|
|
|
|
|
|
|
|
PROTOCOL_DUMB_INCREMENT,
|
|
|
|
PROTOCOL_LWS_MIRROR,
|
|
|
|
|
|
|
|
/* always last */
|
|
|
|
DEMO_PROTOCOL_COUNT
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-12-14 08:52:03 +08:00
|
|
|
/*
|
2015-12-09 08:07:38 +08:00
|
|
|
* dumb_increment protocol
|
2015-12-14 08:52:03 +08:00
|
|
|
*
|
2015-12-09 08:07:38 +08:00
|
|
|
* since this also happens to be protocols[0], some callbacks that are not
|
|
|
|
* bound to a specific protocol also turn up here.
|
|
|
|
*/
|
2011-01-22 12:51:57 +00:00
|
|
|
|
|
|
|
static int
|
2015-12-17 07:54:44 +08:00
|
|
|
callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
2015-12-09 07:10:03 +08:00
|
|
|
void *user, void *in, size_t len)
|
2011-01-22 12:51:57 +00:00
|
|
|
{
|
|
|
|
switch (reason) {
|
|
|
|
|
2013-09-20 20:26:12 +08:00
|
|
|
case LWS_CALLBACK_CLIENT_ESTABLISHED:
|
2015-12-09 08:07:38 +08:00
|
|
|
lwsl_info("dumb: LWS_CALLBACK_CLIENT_ESTABLISHED\n");
|
2013-09-20 20:26:12 +08:00
|
|
|
break;
|
|
|
|
|
2011-05-24 22:06:17 +01:00
|
|
|
case LWS_CALLBACK_CLOSED:
|
2015-12-09 07:10:03 +08:00
|
|
|
lwsl_notice("dumb: LWS_CALLBACK_CLOSED\n");
|
|
|
|
wsi_dumb = NULL;
|
2011-05-24 22:06:17 +01:00
|
|
|
break;
|
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
case LWS_CALLBACK_CLIENT_RECEIVE:
|
2011-01-27 06:26:52 +00:00
|
|
|
((char *)in)[len] = '\0';
|
2015-12-09 08:07:38 +08:00
|
|
|
lwsl_info("rx %d '%s'\n", (int)len, (char *)in);
|
2011-01-22 12:51:57 +00:00
|
|
|
break;
|
|
|
|
|
2011-03-06 13:32:53 +00:00
|
|
|
/* because we are protocols[0] ... */
|
|
|
|
|
2015-12-09 08:07:38 +08:00
|
|
|
case LWS_CALLBACK_CLIENT_CONNECTION_ERROR:
|
|
|
|
if (wsi == wsi_dumb) {
|
|
|
|
lwsl_err("dumb: LWS_CALLBACK_CLIENT_CONNECTION_ERROR\n");
|
|
|
|
wsi_dumb = NULL;
|
|
|
|
}
|
|
|
|
if (wsi == wsi_mirror) {
|
|
|
|
lwsl_err("mirror: LWS_CALLBACK_CLIENT_CONNECTION_ERROR\n");
|
|
|
|
wsi_mirror = NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2011-03-06 13:32:53 +00:00
|
|
|
case LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED:
|
2011-05-24 22:06:17 +01:00
|
|
|
if ((strcmp(in, "deflate-stream") == 0) && deny_deflate) {
|
2015-12-09 08:07:38 +08:00
|
|
|
lwsl_notice("denied deflate-stream extension\n");
|
2011-05-24 22:06:17 +01:00
|
|
|
return 1;
|
|
|
|
}
|
2013-03-16 12:34:36 +08:00
|
|
|
if ((strcmp(in, "deflate-frame") == 0) && deny_deflate) {
|
2015-12-09 08:07:38 +08:00
|
|
|
lwsl_notice("denied deflate-frame extension\n");
|
2013-03-16 12:34:36 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2011-05-24 22:06:17 +01:00
|
|
|
if ((strcmp(in, "x-google-mux") == 0) && deny_mux) {
|
2015-12-09 08:07:38 +08:00
|
|
|
lwsl_notice("denied x-google-mux extension\n");
|
2011-05-24 22:06:17 +01:00
|
|
|
return 1;
|
|
|
|
}
|
2011-03-06 13:32:53 +00:00
|
|
|
break;
|
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* lws-mirror_protocol */
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
2015-12-17 07:54:44 +08:00
|
|
|
callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
2015-12-09 08:07:38 +08:00
|
|
|
void *user, void *in, size_t len)
|
2011-01-22 12:51:57 +00:00
|
|
|
{
|
2011-01-27 06:26:52 +00:00
|
|
|
unsigned char buf[LWS_SEND_BUFFER_PRE_PADDING + 4096 +
|
2015-12-09 08:07:38 +08:00
|
|
|
LWS_SEND_BUFFER_POST_PADDING];
|
|
|
|
unsigned int rands[4];
|
2013-01-20 17:08:31 +08:00
|
|
|
int l = 0;
|
|
|
|
int n;
|
2011-01-27 06:26:52 +00:00
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
switch (reason) {
|
2011-01-27 06:26:52 +00:00
|
|
|
case LWS_CALLBACK_CLIENT_ESTABLISHED:
|
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
lwsl_notice("mirror: LWS_CALLBACK_CLIENT_ESTABLISHED\n");
|
2013-09-20 20:26:12 +08:00
|
|
|
|
2015-12-17 18:25:25 +08:00
|
|
|
lws_get_random(lws_get_context(wsi), rands, sizeof(rands[0]));
|
2015-12-09 08:07:38 +08:00
|
|
|
mirror_lifetime = 16384 + (rands[0] & 65535);
|
2013-09-20 20:26:12 +08:00
|
|
|
/* useful to test single connection stability */
|
|
|
|
if (longlived)
|
2015-12-09 07:10:03 +08:00
|
|
|
mirror_lifetime += 500000;
|
2013-09-20 20:26:12 +08:00
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
lwsl_info("opened mirror connection with "
|
|
|
|
"%d lifetime\n", mirror_lifetime);
|
2013-09-20 20:26:12 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* mirror_lifetime is decremented each send, when it reaches
|
|
|
|
* zero the connection is closed in the send callback.
|
|
|
|
* When the close callback comes, wsi_mirror is set to NULL
|
|
|
|
* so a new connection will be opened
|
2015-12-09 08:07:38 +08:00
|
|
|
*
|
2011-01-27 06:26:52 +00:00
|
|
|
* start the ball rolling,
|
2011-01-27 06:36:39 +00:00
|
|
|
* LWS_CALLBACK_CLIENT_WRITEABLE will come next service
|
2011-01-27 06:26:52 +00:00
|
|
|
*/
|
2015-12-16 18:19:08 +08:00
|
|
|
lws_callback_on_writable(wsi);
|
2011-01-27 06:26:52 +00:00
|
|
|
break;
|
|
|
|
|
2013-09-20 20:26:12 +08:00
|
|
|
case LWS_CALLBACK_CLOSED:
|
2015-12-09 07:10:03 +08:00
|
|
|
lwsl_notice("mirror: LWS_CALLBACK_CLOSED mirror_lifetime=%d\n", mirror_lifetime);
|
2013-09-20 20:26:12 +08:00
|
|
|
wsi_mirror = NULL;
|
|
|
|
break;
|
|
|
|
|
2011-01-27 06:26:52 +00:00
|
|
|
case LWS_CALLBACK_CLIENT_WRITEABLE:
|
2014-11-30 13:53:19 +08:00
|
|
|
for (n = 0; n < 1; n++) {
|
2015-12-17 18:25:25 +08:00
|
|
|
lws_get_random(lws_get_context(wsi), rands, sizeof(rands));
|
2013-01-20 17:08:31 +08:00
|
|
|
l += sprintf((char *)&buf[LWS_SEND_BUFFER_PRE_PADDING + l],
|
2011-01-27 06:26:52 +00:00
|
|
|
"c #%06X %d %d %d;",
|
2014-11-30 13:53:19 +08:00
|
|
|
(int)rands[0] & 0xffffff,
|
|
|
|
(int)rands[1] % 500,
|
|
|
|
(int)rands[2] % 250,
|
|
|
|
(int)rands[3] % 24);
|
|
|
|
}
|
2011-01-27 06:26:52 +00:00
|
|
|
|
2015-12-09 08:07:38 +08:00
|
|
|
n = lws_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING], l,
|
|
|
|
opts | LWS_WRITE_TEXT);
|
2013-02-23 10:50:10 +08:00
|
|
|
if (n < 0)
|
|
|
|
return -1;
|
|
|
|
if (n < l) {
|
|
|
|
lwsl_err("Partial write LWS_CALLBACK_CLIENT_WRITEABLE\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2013-02-09 14:10:04 +08:00
|
|
|
mirror_lifetime--;
|
|
|
|
if (!mirror_lifetime) {
|
2015-12-09 08:07:38 +08:00
|
|
|
lwsl_info("closing mirror session\n");
|
2013-02-11 14:08:50 +08:00
|
|
|
return -1;
|
2015-12-09 08:07:38 +08:00
|
|
|
}
|
|
|
|
/* get notified as soon as we can write again */
|
2015-12-16 18:19:08 +08:00
|
|
|
lws_callback_on_writable(wsi);
|
2011-01-22 12:51:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* list of supported protocols and callbacks */
|
|
|
|
|
2015-12-04 11:08:32 +08:00
|
|
|
static struct lws_protocols protocols[] = {
|
2011-03-02 22:03:47 +00:00
|
|
|
{
|
2014-07-19 06:52:39 +08:00
|
|
|
"dumb-increment-protocol,fake-nonexistant-protocol",
|
2011-03-02 22:03:47 +00:00
|
|
|
callback_dumb_increment,
|
|
|
|
0,
|
2013-02-06 21:10:16 +09:00
|
|
|
20,
|
2011-01-22 12:51:57 +00:00
|
|
|
},
|
2011-03-02 22:03:47 +00:00
|
|
|
{
|
2014-07-19 06:52:39 +08:00
|
|
|
"fake-nonexistant-protocol,lws-mirror-protocol",
|
2011-03-02 22:03:47 +00:00
|
|
|
callback_lws_mirror,
|
|
|
|
0,
|
2013-02-09 14:07:32 +08:00
|
|
|
128,
|
2011-01-22 12:51:57 +00:00
|
|
|
},
|
2013-02-06 21:10:16 +09:00
|
|
|
{ NULL, NULL, 0, 0 } /* end */
|
2011-01-22 12:51:57 +00:00
|
|
|
};
|
|
|
|
|
2013-02-11 14:32:02 +08:00
|
|
|
void sighandler(int sig)
|
|
|
|
{
|
|
|
|
force_exit = 1;
|
|
|
|
}
|
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
static struct option options[] = {
|
2011-01-27 06:26:52 +00:00
|
|
|
{ "help", no_argument, NULL, 'h' },
|
2013-01-10 22:28:59 +08:00
|
|
|
{ "debug", required_argument, NULL, 'd' },
|
2011-01-27 06:26:52 +00:00
|
|
|
{ "port", required_argument, NULL, 'p' },
|
|
|
|
{ "ssl", no_argument, NULL, 's' },
|
2011-02-09 08:49:14 +00:00
|
|
|
{ "version", required_argument, NULL, 'v' },
|
2011-03-06 13:32:53 +00:00
|
|
|
{ "undeflated", no_argument, NULL, 'u' },
|
2011-05-24 22:06:17 +01:00
|
|
|
{ "nomux", no_argument, NULL, 'n' },
|
2013-01-13 11:58:18 +08:00
|
|
|
{ "longlived", no_argument, NULL, 'l' },
|
2011-01-22 12:51:57 +00:00
|
|
|
{ NULL, 0, 0, 0 }
|
|
|
|
};
|
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
static int ratelimit_connects(unsigned int *last, int secs)
|
|
|
|
{
|
|
|
|
struct timeval tv;
|
|
|
|
|
|
|
|
gettimeofday(&tv, NULL);
|
|
|
|
if (tv.tv_sec - (*last) < secs)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
*last = tv.tv_sec;
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
2011-01-22 12:51:57 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2015-12-09 07:10:03 +08:00
|
|
|
int n = 0, ret = 0, port = 7681, use_ssl = 0;
|
|
|
|
unsigned int rl_dumb = 0, rl_mirror = 0;
|
|
|
|
struct lws_context_creation_info info;
|
2015-12-04 11:08:32 +08:00
|
|
|
struct lws_context *context;
|
2011-02-09 08:49:14 +00:00
|
|
|
int ietf_version = -1; /* latest */
|
2015-12-09 07:10:03 +08:00
|
|
|
const char *address;
|
2013-02-09 14:01:09 +08:00
|
|
|
|
|
|
|
memset(&info, 0, sizeof info);
|
2011-01-27 06:26:52 +00:00
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
fprintf(stderr, "libwebsockets test client\n"
|
2015-03-28 11:35:40 +08:00
|
|
|
"(C) Copyright 2010-2015 Andy Green <andy@warmcat.com> "
|
2015-12-09 07:10:03 +08:00
|
|
|
"licensed under LGPL2.1\n");
|
2011-01-22 12:51:57 +00:00
|
|
|
|
|
|
|
if (argc < 2)
|
|
|
|
goto usage;
|
|
|
|
|
|
|
|
while (n >= 0) {
|
2013-01-21 09:53:35 +08:00
|
|
|
n = getopt_long(argc, argv, "nuv:hsp:d:l", options, NULL);
|
2011-01-22 12:51:57 +00:00
|
|
|
if (n < 0)
|
|
|
|
continue;
|
|
|
|
switch (n) {
|
2013-01-10 22:28:59 +08:00
|
|
|
case 'd':
|
2013-01-12 09:17:42 +08:00
|
|
|
lws_set_log_level(atoi(optarg), NULL);
|
2013-01-10 22:28:59 +08:00
|
|
|
break;
|
2011-01-22 12:51:57 +00:00
|
|
|
case 's':
|
2011-01-27 06:26:52 +00:00
|
|
|
use_ssl = 2; /* 2 = allow selfsigned */
|
2011-01-22 12:51:57 +00:00
|
|
|
break;
|
|
|
|
case 'p':
|
|
|
|
port = atoi(optarg);
|
|
|
|
break;
|
2013-01-13 11:58:18 +08:00
|
|
|
case 'l':
|
|
|
|
longlived = 1;
|
|
|
|
break;
|
2011-02-09 08:49:14 +00:00
|
|
|
case 'v':
|
|
|
|
ietf_version = atoi(optarg);
|
|
|
|
break;
|
2011-03-06 13:32:53 +00:00
|
|
|
case 'u':
|
|
|
|
deny_deflate = 1;
|
|
|
|
break;
|
2011-05-24 22:06:17 +01:00
|
|
|
case 'n':
|
|
|
|
deny_mux = 1;
|
|
|
|
break;
|
2011-01-22 12:51:57 +00:00
|
|
|
case 'h':
|
|
|
|
goto usage;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-06 17:42:06 +00:00
|
|
|
if (optind >= argc)
|
|
|
|
goto usage;
|
|
|
|
|
2013-02-11 14:32:02 +08:00
|
|
|
signal(SIGINT, sighandler);
|
|
|
|
|
2011-02-06 17:42:06 +00:00
|
|
|
address = argv[optind];
|
|
|
|
|
2011-01-22 12:51:57 +00:00
|
|
|
/*
|
|
|
|
* create the websockets context. This tracks open connections and
|
|
|
|
* knows how to route any traffic and which protocol version to use,
|
|
|
|
* and if each connection is client or server side.
|
|
|
|
*
|
|
|
|
* For this client-only demo, we tell it to not listen on any port.
|
|
|
|
*/
|
|
|
|
|
2013-02-09 14:01:09 +08:00
|
|
|
info.port = CONTEXT_PORT_NO_LISTEN;
|
|
|
|
info.protocols = protocols;
|
2013-01-20 17:08:31 +08:00
|
|
|
#ifndef LWS_NO_EXTENSIONS
|
2015-12-04 08:43:54 +08:00
|
|
|
info.extensions = lws_get_internal_extensions();
|
2013-01-20 17:08:31 +08:00
|
|
|
#endif
|
2013-02-09 14:01:09 +08:00
|
|
|
info.gid = -1;
|
|
|
|
info.uid = -1;
|
|
|
|
|
2015-12-04 08:43:54 +08:00
|
|
|
context = lws_create_context(&info);
|
2011-01-22 12:51:57 +00:00
|
|
|
if (context == NULL) {
|
|
|
|
fprintf(stderr, "Creating libwebsocket context failed\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sit there servicing the websocket context to handle incoming
|
|
|
|
* packets, and drawing random circles on the mirror protocol websocket
|
2015-12-09 08:07:38 +08:00
|
|
|
*
|
2013-09-20 20:26:12 +08:00
|
|
|
* nothing happens until the client websocket connection is
|
2015-12-09 08:07:38 +08:00
|
|
|
* asynchronously established... calling lws_client_connect() only
|
|
|
|
* instantiates the connection logically, lws_service() progresses it
|
|
|
|
* asynchronously.
|
2011-01-22 12:51:57 +00:00
|
|
|
*/
|
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
while (!force_exit) {
|
2013-02-09 14:10:04 +08:00
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
if (!wsi_dumb && ratelimit_connects(&rl_dumb, 2)) {
|
|
|
|
lwsl_notice("dumb: connecting\n");
|
|
|
|
wsi_dumb = lws_client_connect(context, address, port,
|
|
|
|
use_ssl, "/", argv[optind], argv[optind],
|
|
|
|
protocols[PROTOCOL_DUMB_INCREMENT].name,
|
|
|
|
ietf_version);
|
|
|
|
}
|
2013-02-09 14:10:04 +08:00
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
if (!wsi_mirror && ratelimit_connects(&rl_mirror, 2)) {
|
|
|
|
lwsl_notice("mirror: connecting\n");
|
|
|
|
wsi_mirror = lws_client_connect(context,
|
|
|
|
address, port, use_ssl, "/",
|
|
|
|
argv[optind], argv[optind],
|
|
|
|
protocols[PROTOCOL_LWS_MIRROR].name,
|
|
|
|
ietf_version);
|
2011-05-24 22:06:17 +01:00
|
|
|
}
|
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
lws_service(context, 500);
|
|
|
|
}
|
2011-02-14 20:25:43 +00:00
|
|
|
|
2015-12-09 07:10:03 +08:00
|
|
|
lwsl_err("Exiting\n");
|
2015-12-04 08:43:54 +08:00
|
|
|
lws_context_destroy(context);
|
2011-01-23 16:50:33 +00:00
|
|
|
|
2013-02-11 14:05:02 +08:00
|
|
|
return ret;
|
2011-01-22 12:51:57 +00:00
|
|
|
|
|
|
|
usage:
|
|
|
|
fprintf(stderr, "Usage: libwebsockets-test-client "
|
2013-01-10 22:28:59 +08:00
|
|
|
"<server address> [--port=<p>] "
|
|
|
|
"[--ssl] [-k] [-v <ver>] "
|
2013-01-13 11:58:18 +08:00
|
|
|
"[-d <log bitfield>] [-l]\n");
|
2011-01-22 12:51:57 +00:00
|
|
|
return 1;
|
|
|
|
}
|