@@ -52,6 +52,7 @@ <h3 class="tsd-index-heading">Methods</h3>
5252< a href ="RCONClient.html#emit " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > emit</ span > </ a >
5353< a href ="RCONClient.html#eventNames " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > event< wbr /> Names</ span > </ a >
5454< a href ="RCONClient.html#executeCommand " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > execute< wbr /> Command</ span > </ a >
55+ < a href ="RCONClient.html#executeCommandAsync " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > execute< wbr /> Command< wbr /> Async</ span > </ a >
5556< a href ="RCONClient.html#getMaxListeners " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > get< wbr /> Max< wbr /> Listeners</ span > </ a >
5657< a href ="RCONClient.html#handleMessage " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > handle< wbr /> Message</ span > </ a >
5758< a href ="RCONClient.html#listenerCount " class ="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > < span > listener< wbr /> Count</ span > </ a >
@@ -103,56 +104,56 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code>
103104< div class ="tsd-comment tsd-typography "> < p > Request ID of the login packet</ p >
104105</ div > < aside class ="tsd-sources ">
105106< ul >
106- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L27 "> src/Client.ts:27</ a > </ li > </ ul > </ aside > </ section >
107+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L27 "> src/Client.ts:27</ a > </ li > </ ul > </ aside > </ section >
107108< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="authenticated " class ="tsd-anchor "> </ a >
108109< h3 class ="tsd-anchor-link "> < span > authenticated</ span > < a href ="#authenticated " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
109110< div class ="tsd-signature "> authenticated< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> boolean</ span > </ div >
110111< div class ="tsd-comment tsd-typography "> < p > Whether or not this client has been authenticated</ p >
111112</ div > < aside class ="tsd-sources ">
112113< ul >
113- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L20 "> src/Client.ts:20</ a > </ li > </ ul > </ aside > </ section >
114+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L20 "> src/Client.ts:20</ a > </ li > </ ul > </ aside > </ section >
114115< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="connected " class ="tsd-anchor "> </ a >
115116< h3 class ="tsd-anchor-link "> < span > connected</ span > < a href ="#connected " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
116117< div class ="tsd-signature "> connected< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> boolean</ span > </ div >
117118< div class ="tsd-comment tsd-typography "> < p > Whether or not this client is connected</ p >
118119</ div > < aside class ="tsd-sources ">
119120< ul >
120- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L22 "> src/Client.ts:22</ a > </ li > </ ul > </ aside > </ section >
121+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L22 "> src/Client.ts:22</ a > </ li > </ ul > </ aside > </ section >
121122< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="handler " class ="tsd-anchor "> </ a >
122123< h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagPrivate "> Private</ code > < span > handler</ span > < a href ="#handler " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
123124< div class ="tsd-signature "> handler< span class ="tsd-signature-symbol "> :</ span > < a href ="RCONPacketHandler.html " class ="tsd-signature-type " data-tsd-kind ="Class "> RCONPacketHandler</ a > </ div >
124125< div class ="tsd-comment tsd-typography "> < p > Packet handler</ p >
125126</ div > < aside class ="tsd-sources ">
126127< ul >
127- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L29 "> src/Client.ts:29</ a > </ li > </ ul > </ aside > </ section >
128+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L29 "> src/Client.ts:29</ a > </ li > </ ul > </ aside > </ section >
128129< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="host " class ="tsd-anchor "> </ a >
129130< h3 class ="tsd-anchor-link "> < span > host</ span > < a href ="#host " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
130131< div class ="tsd-signature "> host< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> string</ span > </ div >
131132< div class ="tsd-comment tsd-typography "> < p > Host this client is linked to</ p >
132133</ div > < aside class ="tsd-sources ">
133134< ul >
134- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L16 "> src/Client.ts:16</ a > </ li > </ ul > </ aside > </ section >
135+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L16 "> src/Client.ts:16</ a > </ li > </ ul > </ aside > </ section >
135136< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="password " class ="tsd-anchor "> </ a >
136137< h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagPrivate "> Private</ code > < span > password</ span > < a href ="#password " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
137138< div class ="tsd-signature "> password< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> string</ span > </ div >
138139< div class ="tsd-comment tsd-typography "> < p > Password used to login</ p >
139140</ div > < aside class ="tsd-sources ">
140141< ul >
141- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L25 "> src/Client.ts:25</ a > </ li > </ ul > </ aside > </ section >
142+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L25 "> src/Client.ts:25</ a > </ li > </ ul > </ aside > </ section >
142143< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="port " class ="tsd-anchor "> </ a >
143144< h3 class ="tsd-anchor-link "> < span > port</ span > < a href ="#port " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
144145< div class ="tsd-signature "> port< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> number</ span > </ div >
145146< div class ="tsd-comment tsd-typography "> < p > Port this client is linked to</ p >
146147</ div > < aside class ="tsd-sources ">
147148< ul >
148- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L18 "> src/Client.ts:18</ a > </ li > </ ul > </ aside > </ section >
149+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L18 "> src/Client.ts:18</ a > </ li > </ ul > </ aside > </ section >
149150< section class ="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class "> < a id ="socket " class ="tsd-anchor "> </ a >
150151< h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagPrivate "> Private</ code > < span > socket</ span > < a href ="#socket " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
151152< div class ="tsd-signature "> socket< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> Socket</ span > </ div >
152153< div class ="tsd-comment tsd-typography "> < p > TCP socket</ p >
153154</ div > < aside class ="tsd-sources ">
154155< ul >
155- < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/adf5d04 /src/Client.ts#L31 "> src/Client.ts:31</ a > </ li > </ ul > </ aside > </ section > </ section >
156+ < li > Defined in < a href ="https://github.com/MinecraftJS/rcon/blob/7c3a3f7 /src/Client.ts#L31 "> src/Client.ts:31</ a > </ li > </ ul > </ aside > </ section > </ section >
156157< section class ="tsd-panel-group tsd-member-group ">
157158< h2 > Methods</ h2 >
158159< section class ="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < a id ="addListener " class ="tsd-anchor "> </ a >
@@ -230,6 +231,9 @@ <h3 class="tsd-anchor-link"><span>execute<wbr/>Command</span><a href="#executeCo
230231< ul class ="tsd-descriptions ">
231232< li class ="tsd-description ">
232233< div class ="tsd-comment tsd-typography "> < p > Execute a command on the server</ p >
234+ < p > This method isn't deprecated but it's
235+ way better to use < code > RCONClient#executeCommandAsync</ code >
236+ because it handles fragmentation unlike this one</ p >
233237
234238< h3 > Returns</ h3 > < p > The request ID (use it to catch the response)</ p >
235239</ div >
@@ -241,6 +245,35 @@ <h5>command: <span class="tsd-signature-type">string</span></h5>
241245< div class ="tsd-comment tsd-typography "> < p > Command to execute on the server</ p >
242246</ div > </ li > </ ul > </ div >
243247< h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> number</ span > </ h4 > </ li > </ ul > </ section >
248+ < section class ="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class "> < a id ="executeCommandAsync " class ="tsd-anchor "> </ a >
249+ < h3 class ="tsd-anchor-link "> < span > execute< wbr /> Command< wbr /> Async</ span > < a href ="#executeCommandAsync " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
250+ < ul class ="tsd-signatures tsd-kind-method tsd-parent-kind-class ">
251+ < li class ="tsd-signature " id ="executeCommandAsync.executeCommandAsync-1 "> execute< wbr /> Command< wbr /> Async< span class ="tsd-signature-symbol "> (</ span > command< span class ="tsd-signature-symbol "> : </ span > < span class ="tsd-signature-type "> string</ span > , timeout< span class ="tsd-signature-symbol "> ?: </ span > < span class ="tsd-signature-type "> number</ span > < span class ="tsd-signature-symbol "> )</ span > < span class ="tsd-signature-symbol "> : </ span > < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> string</ span > < span class ="tsd-signature-symbol "> ></ span > </ li > </ ul >
252+ < ul class ="tsd-descriptions ">
253+ < li class ="tsd-description ">
254+ < div class ="tsd-comment tsd-typography "> < p > Execute a command and asynchronously
255+ get its output</ p >
256+ < p > This method handles everything (including
257+ fragmentation) so you don't have to worry
258+ about it.</ p >
259+
260+ < h3 > Returns</ h3 > < p > A promise that resolves with the command's output</ p >
261+ </ div >
262+ < div class ="tsd-parameters ">
263+ < h4 class ="tsd-parameters-title "> Parameters</ h4 >
264+ < ul class ="tsd-parameter-list ">
265+ < li >
266+ < h5 > command: < span class ="tsd-signature-type "> string</ span > </ h5 >
267+ < div class ="tsd-comment tsd-typography "> < p > Command to execute</ p >
268+ </ div > </ li >
269+ < li >
270+ < h5 > < code class ="tsd-tag ts-flagOptional "> Optional</ code > timeout: < span class ="tsd-signature-type "> number</ span > </ h5 >
271+ < div class ="tsd-comment tsd-typography "> < p > Timeout before the
272+ promise is rejected (prevents promise
273+ from indefinitely being on pending
274+ if something fails), in milliseconds</ p >
275+ </ div > </ li > </ ul > </ div >
276+ < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> string</ span > < span class ="tsd-signature-symbol "> ></ span > </ h4 > </ li > </ ul > </ section >
244277< section class ="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < a id ="getMaxListeners " class ="tsd-anchor "> </ a >
245278< h3 class ="tsd-anchor-link "> < span > get< wbr /> Max< wbr /> Listeners</ span > < a href ="#getMaxListeners " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg class ="icon icon-tabler icon-tabler-link " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < use href ="#icon-anchor-a "> </ use > < use href ="#icon-anchor-b "> </ use > < use href ="#icon-anchor-c "> </ use > </ svg > </ a > </ h3 >
246279< ul class ="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external ">
@@ -544,6 +577,7 @@ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.9389
544577< li class ="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < a href ="RCONClient.html#emit " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > emit</ a > </ li >
545578< li class ="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < a href ="RCONClient.html#eventNames " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > event< wbr /> Names</ a > </ li >
546579< li class ="tsd-kind-method tsd-parent-kind-class "> < a href ="RCONClient.html#executeCommand " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > execute< wbr /> Command</ a > </ li >
580+ < li class ="tsd-kind-method tsd-parent-kind-class "> < a href ="RCONClient.html#executeCommandAsync " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > execute< wbr /> Command< wbr /> Async</ a > </ li >
547581< li class ="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < a href ="RCONClient.html#getMaxListeners " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > get< wbr /> Max< wbr /> Listeners</ a > </ li >
548582< li class ="tsd-kind-method tsd-parent-kind-class "> < a href ="RCONClient.html#handleMessage " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > handle< wbr /> Message</ a > </ li >
549583< li class ="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external "> < a href ="RCONClient.html#listenerCount " class ="tsd-index-link "> < svg class ="tsd-kind-icon " width ="24 " height ="24 " viewBox ="0 0 24 24 "> < use href ="#icon-2048-path "> </ use > < use href ="#icon-2048-text "> </ use > </ svg > listener< wbr /> Count</ a > </ li >
0 commit comments