PageRenderTime 4ms CodeModel.GetById 4ms app.highlight 27ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/io/socket/SocketIO.html

https://github.com/clwillingham/socket.io-java-client
HTML | 651 lines | 559 code | 70 blank | 22 comment | 0 complexity | 00bef5242058e71921cfee8125d093a4 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!--NewPage-->
  3<HTML>
  4<HEAD>
  5<!-- Generated by javadoc (build 1.6.0_29) on Thu Feb 16 08:46:29 CET 2012 -->
  6<TITLE>
  7SocketIO
  8</TITLE>
  9
 10<META NAME="date" CONTENT="2012-02-16">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
 13
 14<SCRIPT type="text/javascript">
 15function windowTitle()
 16{
 17    if (location.href.indexOf('is-external=true') == -1) {
 18        parent.document.title="SocketIO";
 19    }
 20}
 21</SCRIPT>
 22<NOSCRIPT>
 23</NOSCRIPT>
 24
 25</HEAD>
 26
 27<BODY BGCOLOR="white" onload="windowTitle();">
 28<HR>
 29
 30
 31<!-- ========= START OF TOP NAVBAR ======= -->
 32<A NAME="navbar_top"><!-- --></A>
 33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 35<TR>
 36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 37<A NAME="navbar_top_firstrow"><!-- --></A>
 38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 39  <TR ALIGN="center" VALIGN="top">
 40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../io/socket/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 41  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SocketIO.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 47  </TR>
 48</TABLE>
 49</TD>
 50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 51</EM>
 52</TD>
 53</TR>
 54
 55<TR>
 56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 57&nbsp;<A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><B>PREV CLASS</B></A>&nbsp;
 58&nbsp;<A HREF="../../io/socket/SocketIOException.html" title="class in io.socket"><B>NEXT CLASS</B></A></FONT></TD>
 59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 60  <A HREF="../../index.html?io/socket/SocketIO.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 61&nbsp;<A HREF="SocketIO.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 62&nbsp;<SCRIPT type="text/javascript">
 63  <!--
 64  if(window==top) {
 65    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
 66  }
 67  //-->
 68</SCRIPT>
 69<NOSCRIPT>
 70  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
 71</NOSCRIPT>
 72
 73
 74</FONT></TD>
 75</TR>
 76<TR>
 77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 78  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 81</TR>
 82</TABLE>
 83<A NAME="skip-navbar_top"></A>
 84<!-- ========= END OF TOP NAVBAR ========= -->
 85
 86<HR>
 87<!-- ======== START OF CLASS DATA ======== -->
 88<H2>
 89<FONT SIZE="-1">
 90io.socket</FONT>
 91<BR>
 92Class SocketIO</H2>
 93<PRE>
 94java.lang.Object
 95  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>io.socket.SocketIO</B>
 96</PRE>
 97<HR>
 98<DL>
 99<DT><PRE>public class <B>SocketIO</B><DT>extends java.lang.Object</DL>
100</PRE>
101
102<P>
103The Class SocketIO.
104<P>
105
106<P>
107<HR>
108
109<P>
110
111<!-- ======== CONSTRUCTOR SUMMARY ======== -->
112
113<A NAME="constructor_summary"><!-- --></A>
114<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
115<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
116<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
117<B>Constructor Summary</B></FONT></TH>
118</TR>
119<TR BGCOLOR="white" CLASS="TableRowColor">
120<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#SocketIO()">SocketIO</A></B>()</CODE>
121
122<BR>
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a new socket.io connection.</TD>
124</TR>
125<TR BGCOLOR="white" CLASS="TableRowColor">
126<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#SocketIO(java.lang.String)">SocketIO</A></B>(java.lang.String&nbsp;url)</CODE>
127
128<BR>
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a new socket.io connection.</TD>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#SocketIO(java.lang.String, io.socket.IOCallback)">SocketIO</A></B>(java.lang.String&nbsp;url,
133         <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</CODE>
134
135<BR>
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a new socket.io object and connects to the given url.</TD>
137</TR>
138<TR BGCOLOR="white" CLASS="TableRowColor">
139<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#SocketIO(java.net.URL)">SocketIO</A></B>(java.net.URL&nbsp;url)</CODE>
140
141<BR>
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a new socket.io connection.</TD>
143</TR>
144<TR BGCOLOR="white" CLASS="TableRowColor">
145<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#SocketIO(java.net.URL, io.socket.IOCallback)">SocketIO</A></B>(java.net.URL&nbsp;url,
146         <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</CODE>
147
148<BR>
149&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a new socket.io object and connects to the given url.</TD>
150</TR>
151</TABLE>
152&nbsp;
153<!-- ========== METHOD SUMMARY =========== -->
154
155<A NAME="method_summary"><!-- --></A>
156<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
157<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
158<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
159<B>Method Summary</B></FONT></TH>
160</TR>
161<TR BGCOLOR="white" CLASS="TableRowColor">
162<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163<CODE>&nbsp;void</CODE></FONT></TD>
164<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#connect(io.socket.IOCallback)">connect</A></B>(<A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</CODE>
165
166<BR>
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connects to an already set host.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>&nbsp;void</CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#connect(java.lang.String, io.socket.IOCallback)">connect</A></B>(java.lang.String&nbsp;url,
173        <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</CODE>
174
175<BR>
176&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connects to supplied host using callback.</TD>
177</TR>
178<TR BGCOLOR="white" CLASS="TableRowColor">
179<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
180<CODE>&nbsp;void</CODE></FONT></TD>
181<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#connect(java.net.URL, io.socket.IOCallback)">connect</A></B>(java.net.URL&nbsp;url,
182        <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</CODE>
183
184<BR>
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connects to supplied host using callback.</TD>
186</TR>
187<TR BGCOLOR="white" CLASS="TableRowColor">
188<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189<CODE>&nbsp;void</CODE></FONT></TD>
190<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#disconnect()">disconnect</A></B>()</CODE>
191
192<BR>
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disconnect the socket.</TD>
194</TR>
195<TR BGCOLOR="white" CLASS="TableRowColor">
196<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197<CODE>&nbsp;void</CODE></FONT></TD>
198<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#emit(java.lang.String, io.socket.IOAcknowledge, java.lang.Object...)">emit</A></B>(java.lang.String&nbsp;event,
199     <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
200     java.lang.Object...&nbsp;args)</CODE>
201
202<BR>
203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Emits an event to the Socket.IO server.</TD>
204</TR>
205<TR BGCOLOR="white" CLASS="TableRowColor">
206<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
207<CODE>&nbsp;void</CODE></FONT></TD>
208<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#emit(java.lang.String, java.lang.Object...)">emit</A></B>(java.lang.String&nbsp;event,
209     java.lang.Object...&nbsp;args)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Emits an event to the Socket.IO server.</TD>
213</TR>
214<TR BGCOLOR="white" CLASS="TableRowColor">
215<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
216<CODE>&nbsp;<A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A></CODE></FONT></TD>
217<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#getCallback()">getCallback</A></B>()</CODE>
218
219<BR>
220&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the callback.</TD>
221</TR>
222<TR BGCOLOR="white" CLASS="TableRowColor">
223<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
224<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
225<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#getNamespace()">getNamespace</A></B>()</CODE>
226
227<BR>
228&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the namespace.</TD>
229</TR>
230<TR BGCOLOR="white" CLASS="TableRowColor">
231<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232<CODE>&nbsp;boolean</CODE></FONT></TD>
233<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#isConnected()">isConnected</A></B>()</CODE>
234
235<BR>
236&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns, if a connection is established at the moment</TD>
237</TR>
238<TR BGCOLOR="white" CLASS="TableRowColor">
239<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240<CODE>&nbsp;void</CODE></FONT></TD>
241<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#reconnect()">reconnect</A></B>()</CODE>
242
243<BR>
244&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Triggers the transport to reconnect.</TD>
245</TR>
246<TR BGCOLOR="white" CLASS="TableRowColor">
247<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248<CODE>&nbsp;void</CODE></FONT></TD>
249<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#send(io.socket.IOAcknowledge, org.json.JSONObject)">send</A></B>(<A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
250     org.json.JSONObject&nbsp;json)</CODE>
251
252<BR>
253&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send JSON data to the Socket.io server.</TD>
254</TR>
255<TR BGCOLOR="white" CLASS="TableRowColor">
256<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257<CODE>&nbsp;void</CODE></FONT></TD>
258<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#send(io.socket.IOAcknowledge, java.lang.String)">send</A></B>(<A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
259     java.lang.String&nbsp;message)</CODE>
260
261<BR>
262&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send JSON data to the Socket.io server.</TD>
263</TR>
264<TR BGCOLOR="white" CLASS="TableRowColor">
265<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266<CODE>&nbsp;void</CODE></FONT></TD>
267<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#send(org.json.JSONObject)">send</A></B>(org.json.JSONObject&nbsp;json)</CODE>
268
269<BR>
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send JSON data to the Socket.io server.</TD>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274<CODE>&nbsp;void</CODE></FONT></TD>
275<TD><CODE><B><A HREF="../../io/socket/SocketIO.html#send(java.lang.String)">send</A></B>(java.lang.String&nbsp;message)</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send String data to the Socket.io server.</TD>
279</TR>
280</TABLE>
281&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
282<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
283<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
284<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
285</TR>
286<TR BGCOLOR="white" CLASS="TableRowColor">
287<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
288</TR>
289</TABLE>
290&nbsp;
291<P>
292
293<!-- ========= CONSTRUCTOR DETAIL ======== -->
294
295<A NAME="constructor_detail"><!-- --></A>
296<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
297<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
298<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
299<B>Constructor Detail</B></FONT></TH>
300</TR>
301</TABLE>
302
303<A NAME="SocketIO()"><!-- --></A><H3>
304SocketIO</H3>
305<PRE>
306public <B>SocketIO</B>()</PRE>
307<DL>
308<DD>Instantiates a new socket.io connection. The object connects after
309 calling <A HREF="../../io/socket/SocketIO.html#connect(java.net.URL, io.socket.IOCallback)"><CODE>connect(URL, IOCallback)</CODE></A> or
310 <A HREF="../../io/socket/SocketIO.html#connect(java.lang.String, io.socket.IOCallback)"><CODE>connect(String, IOCallback)</CODE></A>
311<P>
312</DL>
313<HR>
314
315<A NAME="SocketIO(java.lang.String)"><!-- --></A><H3>
316SocketIO</H3>
317<PRE>
318public <B>SocketIO</B>(java.lang.String&nbsp;url)
319         throws java.net.MalformedURLException</PRE>
320<DL>
321<DD>Instantiates a new socket.io connection. The object connects after
322 calling <A HREF="../../io/socket/SocketIO.html#connect(io.socket.IOCallback)"><CODE>connect(IOCallback)</CODE></A>
323<P>
324<DL>
325<DT><B>Parameters:</B><DD><CODE>url</CODE> - the url
326<DT><B>Throws:</B>
327<DD><CODE>java.net.MalformedURLException</CODE> - the malformed url exception</DL>
328</DL>
329<HR>
330
331<A NAME="SocketIO(java.lang.String, io.socket.IOCallback)"><!-- --></A><H3>
332SocketIO</H3>
333<PRE>
334public <B>SocketIO</B>(java.lang.String&nbsp;url,
335                <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)
336         throws java.net.MalformedURLException</PRE>
337<DL>
338<DD>Instantiates a new socket.io object and connects to the given url. Do not
339 call any of the connect() methods afterwards.
340<P>
341<DL>
342<DT><B>Parameters:</B><DD><CODE>url</CODE> - the url<DD><CODE>callback</CODE> - the callback
343<DT><B>Throws:</B>
344<DD><CODE>java.net.MalformedURLException</CODE> - the malformed url exception</DL>
345</DL>
346<HR>
347
348<A NAME="SocketIO(java.net.URL, io.socket.IOCallback)"><!-- --></A><H3>
349SocketIO</H3>
350<PRE>
351public <B>SocketIO</B>(java.net.URL&nbsp;url,
352                <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</PRE>
353<DL>
354<DD>Instantiates a new socket.io object and connects to the given url. Do not
355 call any of the connect() methods afterwards.
356<P>
357<DL>
358<DT><B>Parameters:</B><DD><CODE>url</CODE> - the url<DD><CODE>callback</CODE> - the callback</DL>
359</DL>
360<HR>
361
362<A NAME="SocketIO(java.net.URL)"><!-- --></A><H3>
363SocketIO</H3>
364<PRE>
365public <B>SocketIO</B>(java.net.URL&nbsp;url)</PRE>
366<DL>
367<DD>Instantiates a new socket.io connection. The object connects after
368 calling <A HREF="../../io/socket/SocketIO.html#connect(io.socket.IOCallback)"><CODE>connect(IOCallback)</CODE></A>
369<P>
370<DL>
371<DT><B>Parameters:</B><DD><CODE>url</CODE> - the url</DL>
372</DL>
373
374<!-- ============ METHOD DETAIL ========== -->
375
376<A NAME="method_detail"><!-- --></A>
377<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
378<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
379<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
380<B>Method Detail</B></FONT></TH>
381</TR>
382</TABLE>
383
384<A NAME="connect(java.lang.String, io.socket.IOCallback)"><!-- --></A><H3>
385connect</H3>
386<PRE>
387public void <B>connect</B>(java.lang.String&nbsp;url,
388                    <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)
389             throws java.net.MalformedURLException</PRE>
390<DL>
391<DD>connects to supplied host using callback. Do only use this method if you
392 instantiate <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> using <A HREF="../../io/socket/SocketIO.html#SocketIO()"><CODE>SocketIO()</CODE></A>.
393<P>
394<DD><DL>
395<DT><B>Parameters:</B><DD><CODE>url</CODE> - the url<DD><CODE>callback</CODE> - the callback
396<DT><B>Throws:</B>
397<DD><CODE>java.net.MalformedURLException</CODE></DL>
398</DD>
399</DL>
400<HR>
401
402<A NAME="connect(java.net.URL, io.socket.IOCallback)"><!-- --></A><H3>
403connect</H3>
404<PRE>
405public void <B>connect</B>(java.net.URL&nbsp;url,
406                    <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</PRE>
407<DL>
408<DD>connects to supplied host using callback. Do only use this method if you
409 instantiate <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> using <A HREF="../../io/socket/SocketIO.html#SocketIO()"><CODE>SocketIO()</CODE></A>.
410<P>
411<DD><DL>
412<DT><B>Parameters:</B><DD><CODE>url</CODE> - the url<DD><CODE>callback</CODE> - the callback</DL>
413</DD>
414</DL>
415<HR>
416
417<A NAME="connect(io.socket.IOCallback)"><!-- --></A><H3>
418connect</H3>
419<PRE>
420public void <B>connect</B>(<A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A>&nbsp;callback)</PRE>
421<DL>
422<DD>connects to an already set host. Do only use this method if you
423 instantiate <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> using <A HREF="../../io/socket/SocketIO.html#SocketIO(java.lang.String)"><CODE>SocketIO(String)</CODE></A> or
424 <A HREF="../../io/socket/SocketIO.html#SocketIO(java.net.URL)"><CODE>SocketIO(URL)</CODE></A>.
425<P>
426<DD><DL>
427<DT><B>Parameters:</B><DD><CODE>callback</CODE> - the callback</DL>
428</DD>
429</DL>
430<HR>
431
432<A NAME="emit(java.lang.String, java.lang.Object...)"><!-- --></A><H3>
433emit</H3>
434<PRE>
435public void <B>emit</B>(java.lang.String&nbsp;event,
436                 java.lang.Object...&nbsp;args)</PRE>
437<DL>
438<DD>Emits an event to the Socket.IO server. If the connection is not
439 established, the call will be buffered and sent as soon as it is
440 possible.
441<P>
442<DD><DL>
443<DT><B>Parameters:</B><DD><CODE>event</CODE> - the event name<DD><CODE>args</CODE> - the arguments</DL>
444</DD>
445</DL>
446<HR>
447
448<A NAME="emit(java.lang.String, io.socket.IOAcknowledge, java.lang.Object...)"><!-- --></A><H3>
449emit</H3>
450<PRE>
451public void <B>emit</B>(java.lang.String&nbsp;event,
452                 <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
453                 java.lang.Object...&nbsp;args)</PRE>
454<DL>
455<DD>Emits an event to the Socket.IO server. If the connection is not
456 established, the call will be buffered and sent as soon as it is
457 possible.
458<P>
459<DD><DL>
460<DT><B>Parameters:</B><DD><CODE>event</CODE> - the event name<DD><CODE>ack</CODE> - an acknowledge implementation<DD><CODE>args</CODE> - the arguments</DL>
461</DD>
462</DL>
463<HR>
464
465<A NAME="getCallback()"><!-- --></A><H3>
466getCallback</H3>
467<PRE>
468public <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A> <B>getCallback</B>()</PRE>
469<DL>
470<DD>Gets the callback. Internally used.
471<P>
472<DD><DL>
473
474<DT><B>Returns:</B><DD>the callback</DL>
475</DD>
476</DL>
477<HR>
478
479<A NAME="getNamespace()"><!-- --></A><H3>
480getNamespace</H3>
481<PRE>
482public java.lang.String <B>getNamespace</B>()</PRE>
483<DL>
484<DD>Gets the namespace. Internally used.
485<P>
486<DD><DL>
487
488<DT><B>Returns:</B><DD>the namespace</DL>
489</DD>
490</DL>
491<HR>
492
493<A NAME="send(org.json.JSONObject)"><!-- --></A><H3>
494send</H3>
495<PRE>
496public void <B>send</B>(org.json.JSONObject&nbsp;json)</PRE>
497<DL>
498<DD>Send JSON data to the Socket.io server.
499<P>
500<DD><DL>
501<DT><B>Parameters:</B><DD><CODE>json</CODE> - the JSON object</DL>
502</DD>
503</DL>
504<HR>
505
506<A NAME="send(io.socket.IOAcknowledge, org.json.JSONObject)"><!-- --></A><H3>
507send</H3>
508<PRE>
509public void <B>send</B>(<A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
510                 org.json.JSONObject&nbsp;json)</PRE>
511<DL>
512<DD>Send JSON data to the Socket.io server.
513<P>
514<DD><DL>
515<DT><B>Parameters:</B><DD><CODE>ack</CODE> - an acknowledge implementation<DD><CODE>json</CODE> - the JSON object</DL>
516</DD>
517</DL>
518<HR>
519
520<A NAME="send(java.lang.String)"><!-- --></A><H3>
521send</H3>
522<PRE>
523public void <B>send</B>(java.lang.String&nbsp;message)</PRE>
524<DL>
525<DD>Send String data to the Socket.io server.
526<P>
527<DD><DL>
528<DT><B>Parameters:</B><DD><CODE>message</CODE> - the message String</DL>
529</DD>
530</DL>
531<HR>
532
533<A NAME="send(io.socket.IOAcknowledge, java.lang.String)"><!-- --></A><H3>
534send</H3>
535<PRE>
536public void <B>send</B>(<A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
537                 java.lang.String&nbsp;message)</PRE>
538<DL>
539<DD>Send JSON data to the Socket.io server.
540<P>
541<DD><DL>
542<DT><B>Parameters:</B><DD><CODE>ack</CODE> - an acknowledge implementation<DD><CODE>message</CODE> - the message String</DL>
543</DD>
544</DL>
545<HR>
546
547<A NAME="disconnect()"><!-- --></A><H3>
548disconnect</H3>
549<PRE>
550public void <B>disconnect</B>()</PRE>
551<DL>
552<DD>Disconnect the socket.
553<P>
554<DD><DL>
555</DL>
556</DD>
557</DL>
558<HR>
559
560<A NAME="reconnect()"><!-- --></A><H3>
561reconnect</H3>
562<PRE>
563public void <B>reconnect</B>()</PRE>
564<DL>
565<DD>Triggers the transport to reconnect.
566 
567 This had become useful on some android devices which do not shut down
568 tcp-connections when switching from HSDPA to Wifi
569<P>
570<DD><DL>
571</DL>
572</DD>
573</DL>
574<HR>
575
576<A NAME="isConnected()"><!-- --></A><H3>
577isConnected</H3>
578<PRE>
579public boolean <B>isConnected</B>()</PRE>
580<DL>
581<DD>Returns, if a connection is established at the moment
582<P>
583<DD><DL>
584
585<DT><B>Returns:</B><DD>true if a connection is established, false if the transport is
586         not connected or currently connecting</DL>
587</DD>
588</DL>
589<!-- ========= END OF CLASS DATA ========= -->
590<HR>
591
592
593<!-- ======= START OF BOTTOM NAVBAR ====== -->
594<A NAME="navbar_bottom"><!-- --></A>
595<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
596<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
597<TR>
598<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
599<A NAME="navbar_bottom_firstrow"><!-- --></A>
600<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
601  <TR ALIGN="center" VALIGN="top">
602  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../io/socket/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
603  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
604  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SocketIO.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
605  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
606  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
607  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
608  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
609  </TR>
610</TABLE>
611</TD>
612<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
613</EM>
614</TD>
615</TR>
616
617<TR>
618<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
619&nbsp;<A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><B>PREV CLASS</B></A>&nbsp;
620&nbsp;<A HREF="../../io/socket/SocketIOException.html" title="class in io.socket"><B>NEXT CLASS</B></A></FONT></TD>
621<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
622  <A HREF="../../index.html?io/socket/SocketIO.html" target="_top"><B>FRAMES</B></A>  &nbsp;
623&nbsp;<A HREF="SocketIO.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
624&nbsp;<SCRIPT type="text/javascript">
625  <!--
626  if(window==top) {
627    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
628  }
629  //-->
630</SCRIPT>
631<NOSCRIPT>
632  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
633</NOSCRIPT>
634
635
636</FONT></TD>
637</TR>
638<TR>
639<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
640  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
641<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
642DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
643</TR>
644</TABLE>
645<A NAME="skip-navbar_bottom"></A>
646<!-- ======== END OF BOTTOM NAVBAR ======= -->
647
648<HR>
649
650</BODY>
651</HTML>