-
Notifications
You must be signed in to change notification settings - Fork 0
/
websocket_8h.html
175 lines (166 loc) · 7.86 KB
/
websocket_8h.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CogLink: include/websocket.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">CogLink<span id="projectnumber"> v3.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">websocket.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Websocket client for the node.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "<a class="el" href="lavalink_8h_source.html">lavalink.h</a>"</code><br />
<code>#include "codecs.h"</code><br />
</div>
<p><a href="websocket_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a62a7e760344135781a6c3626be782738"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="websocket_8h.html#a62a7e760344135781a6c3626be782738">coglink_connect_nodes</a> (struct coglink_client *c_client, struct discord *client, struct coglink_nodes *nodes)</td></tr>
<tr class="memdesc:a62a7e760344135781a6c3626be782738"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the CogLink client and connect to the nodes. <a href="websocket_8h.html#a62a7e760344135781a6c3626be782738">More...</a><br /></td></tr>
<tr class="separator:a62a7e760344135781a6c3626be782738"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d29d6cfc8ee8ba1ae8a21256ff1c6f6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="websocket_8h.html#a1d29d6cfc8ee8ba1ae8a21256ff1c6f6">coglink_cleanup</a> (struct coglink_client *c_client)</td></tr>
<tr class="memdesc:a1d29d6cfc8ee8ba1ae8a21256ff1c6f6"><td class="mdescLeft"> </td><td class="mdescRight">Cleanups all the resources used by the CogLink client. <a href="websocket_8h.html#a1d29d6cfc8ee8ba1ae8a21256ff1c6f6">More...</a><br /></td></tr>
<tr class="separator:a1d29d6cfc8ee8ba1ae8a21256ff1c6f6"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Websocket client for the node. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a1d29d6cfc8ee8ba1ae8a21256ff1c6f6" name="a1d29d6cfc8ee8ba1ae8a21256ff1c6f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d29d6cfc8ee8ba1ae8a21256ff1c6f6">◆ </a></span>coglink_cleanup()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void coglink_cleanup </td>
<td>(</td>
<td class="paramtype">struct coglink_client * </td>
<td class="paramname"><em>c_client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Cleanups all the resources used by the CogLink client. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">c_client</td><td>The CogLink client.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function can't be replaced (outside cleanup) as it cleans global resources. </dd></dl>
</div>
</div>
<a id="a62a7e760344135781a6c3626be782738" name="a62a7e760344135781a6c3626be782738"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62a7e760344135781a6c3626be782738">◆ </a></span>coglink_connect_nodes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int coglink_connect_nodes </td>
<td>(</td>
<td class="paramtype">struct coglink_client * </td>
<td class="paramname"><em>c_client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct discord * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct coglink_nodes * </td>
<td class="paramname"><em>nodes</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the CogLink client and connect to the nodes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">c_client</td><td>The CogLink client. Should be allocated outside of this function. </td></tr>
<tr><td class="paramname">client</td><td>The Discord client created with discord_init. </td></tr>
<tr><td class="paramname">nodes</td><td>The nodes to connect to.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int COGLINK_SUCCESS on success, COGLINK_FAILED on failure.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function should be called after discord_init. </dd>
<dd>
The CogLink client should be cleaned up with coglink_cleanup. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>