2019-02-28 21:54:03 -08:00
|
|
|
/*
|
|
|
|
* ws.h
|
|
|
|
* Author: Benjamin Sergeant
|
|
|
|
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace ix
|
|
|
|
{
|
|
|
|
int ws_http_client_main(const std::string& url,
|
|
|
|
const std::string& headers,
|
|
|
|
const std::string& data,
|
|
|
|
bool headersOnly,
|
|
|
|
int connectTimeout,
|
|
|
|
int transferTimeout,
|
|
|
|
bool followRedirects,
|
|
|
|
int maxRedirects,
|
|
|
|
bool verbose,
|
|
|
|
bool save,
|
|
|
|
const std::string& output,
|
|
|
|
bool compress);
|
|
|
|
|
|
|
|
int ws_ping_pong_main(const std::string& url);
|
|
|
|
|
2019-03-13 23:09:45 -07:00
|
|
|
int ws_echo_server_main(int port, const std::string& hostname);
|
2019-03-10 16:36:44 -07:00
|
|
|
int ws_broadcast_server_main(int port, const std::string& hostname);
|
2019-03-13 23:09:45 -07:00
|
|
|
int ws_transfer_main(int port, const std::string& hostname);
|
2019-02-28 21:54:03 -08:00
|
|
|
|
2019-05-30 08:46:50 -07:00
|
|
|
int ws_chat_main(const std::string& url, const std::string& user);
|
2019-02-28 21:54:03 -08:00
|
|
|
|
2019-04-29 14:31:29 -07:00
|
|
|
int ws_connect_main(const std::string& url, bool disableAutomaticReconnection);
|
2019-02-28 21:54:03 -08:00
|
|
|
|
2019-05-30 08:46:50 -07:00
|
|
|
int ws_receive_main(const std::string& url, bool enablePerMessageDeflate, int delayMs);
|
2019-02-28 21:54:03 -08:00
|
|
|
|
2019-05-30 08:46:50 -07:00
|
|
|
int ws_send_main(const std::string& url, const std::string& path);
|
2019-03-20 14:29:02 -07:00
|
|
|
|
|
|
|
int ws_redis_publish_main(const std::string& hostname,
|
|
|
|
int port,
|
2019-03-26 09:33:22 -07:00
|
|
|
const std::string& password,
|
2019-03-20 14:29:02 -07:00
|
|
|
const std::string& channel,
|
2019-03-27 13:41:46 -07:00
|
|
|
const std::string& message,
|
|
|
|
int count);
|
2019-03-20 14:29:02 -07:00
|
|
|
|
|
|
|
int ws_redis_subscribe_main(const std::string& hostname,
|
|
|
|
int port,
|
2019-03-26 09:33:22 -07:00
|
|
|
const std::string& password,
|
2019-03-20 14:29:02 -07:00
|
|
|
const std::string& channel,
|
|
|
|
bool verbose);
|
2019-04-08 21:52:20 -07:00
|
|
|
|
|
|
|
int ws_cobra_subscribe_main(const std::string& appkey,
|
|
|
|
const std::string& endpoint,
|
|
|
|
const std::string& rolename,
|
|
|
|
const std::string& rolesecret,
|
2019-04-19 11:45:42 -07:00
|
|
|
const std::string& channel);
|
2019-04-08 21:52:20 -07:00
|
|
|
|
2019-04-21 11:16:33 -07:00
|
|
|
int ws_cobra_publish_main(const std::string& appkey,
|
|
|
|
const std::string& endpoint,
|
|
|
|
const std::string& rolename,
|
|
|
|
const std::string& rolesecret,
|
|
|
|
const std::string& channel,
|
2019-04-22 17:24:01 -07:00
|
|
|
const std::string& path,
|
|
|
|
bool stress);
|
2019-04-21 11:16:33 -07:00
|
|
|
|
2019-04-08 21:52:20 -07:00
|
|
|
int ws_cobra_to_statsd_main(const std::string& appkey,
|
|
|
|
const std::string& endpoint,
|
|
|
|
const std::string& rolename,
|
|
|
|
const std::string& rolesecret,
|
|
|
|
const std::string& channel,
|
|
|
|
const std::string& host,
|
|
|
|
int port,
|
|
|
|
const std::string& prefix,
|
|
|
|
const std::string& fields,
|
|
|
|
bool verbose);
|
2019-04-17 20:31:34 -07:00
|
|
|
|
2019-04-11 16:03:05 -07:00
|
|
|
int ws_cobra_to_sentry_main(const std::string& appkey,
|
|
|
|
const std::string& endpoint,
|
|
|
|
const std::string& rolename,
|
|
|
|
const std::string& rolesecret,
|
|
|
|
const std::string& channel,
|
|
|
|
const std::string& dsn,
|
|
|
|
bool verbose,
|
|
|
|
bool strict,
|
|
|
|
int jobs);
|
2019-04-22 17:24:01 -07:00
|
|
|
|
|
|
|
int ws_snake_main(int port,
|
|
|
|
const std::string& hostname,
|
|
|
|
const std::string& redisHosts,
|
|
|
|
int redisPort,
|
|
|
|
const std::string& redisPassword,
|
|
|
|
bool verbose,
|
|
|
|
const std::string& appsConfigPath);
|
2019-05-30 08:46:50 -07:00
|
|
|
} // namespace ix
|