PageRenderTime 51ms CodeModel.GetById 2ms app.highlight 42ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/io/socket/IOConnection.html

https://github.com/clwillingham/socket.io-java-client
HTML | 660 lines | 567 code | 71 blank | 22 comment | 0 complexity | c5d56327998e919ba255f2828598eaf5 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>
  7IOConnection
  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="IOConnection";
 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/IOConnection.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/IOCallback.html" title="interface in io.socket"><B>PREV CLASS</B></A>&nbsp;
 58&nbsp;<A HREF="../../io/socket/IOMessage.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/IOConnection.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 61&nbsp;<A HREF="IOConnection.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&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 IOConnection</H2>
 93<PRE>
 94java.lang.Object
 95  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>io.socket.IOConnection</B>
 96</PRE>
 97<HR>
 98<DL>
 99<DT><PRE> class <B>IOConnection</B><DT>extends java.lang.Object</DL>
100</PRE>
101
102<P>
103The Class IOConnection.
104<P>
105
106<P>
107<HR>
108
109<P>
110<!-- =========== FIELD SUMMARY =========== -->
111
112<A NAME="field_summary"><!-- --></A>
113<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
114<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
115<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
116<B>Field Summary</B></FONT></TH>
117</TR>
118<TR BGCOLOR="white" CLASS="TableRowColor">
119<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
120<CODE>(package private) &nbsp;java.util.HashMap&lt;java.lang.Integer,<A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&gt;</CODE></FONT></TD>
121<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#acknowledge">acknowledge</A></B></CODE>
122
123<BR>
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Acknowledges.</TD>
125</TR>
126<TR BGCOLOR="white" CLASS="TableRowColor">
127<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
128<CODE>static&nbsp;<A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A></CODE></FONT></TD>
129<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#DUMMY_CALLBACK">DUMMY_CALLBACK</A></B></CODE>
130
131<BR>
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A dummy callback used when IOConnection receives a unexpected message.</TD>
133</TR>
134<TR BGCOLOR="white" CLASS="TableRowColor">
135<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
136<CODE>(package private) &nbsp;java.util.TimerTask</CODE></FONT></TD>
137<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#heartBeatTask">heartBeatTask</A></B></CODE>
138
139<BR>
140&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The heart beat task.</TD>
141</TR>
142<TR BGCOLOR="white" CLASS="TableRowColor">
143<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
145<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#SOCKET_IO_1">SOCKET_IO_1</A></B></CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Socket.io path.</TD>
149</TR>
150</TABLE>
151&nbsp;
152<!-- ========== METHOD SUMMARY =========== -->
153
154<A NAME="method_summary"><!-- --></A>
155<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
157<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
158<B>Method Summary</B></FONT></TH>
159</TR>
160<TR BGCOLOR="white" CLASS="TableRowColor">
161<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162<CODE>&nbsp;void</CODE></FONT></TD>
163<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#emit(io.socket.SocketIO, java.lang.String, io.socket.IOAcknowledge, java.lang.Object...)">emit</A></B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket,
164     java.lang.String&nbsp;event,
165     <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
166     java.lang.Object...&nbsp;args)</CODE>
167
168<BR>
169&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emits an event from <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> to the <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A>.</TD>
170</TR>
171<TR BGCOLOR="white" CLASS="TableRowColor">
172<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173<CODE>protected &nbsp;void</CODE></FONT></TD>
174<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#error(io.socket.SocketIOException)">error</A></B>(<A HREF="../../io/socket/SocketIOException.html" title="class in io.socket">SocketIOException</A>&nbsp;e)</CODE>
175
176<BR>
177&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Populates an error to the connected <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket"><CODE>IOCallback</CODE></A>s and shuts down.</TD>
178</TR>
179<TR BGCOLOR="white" CLASS="TableRowColor">
180<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
182<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#getSessionId()">getSessionId</A></B>()</CODE>
183
184<BR>
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the session id.</TD>
186</TR>
187<TR BGCOLOR="white" CLASS="TableRowColor">
188<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189<CODE>&nbsp;int</CODE></FONT></TD>
190<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#getState()">getState</A></B>()</CODE>
191
192<BR>
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
194</TR>
195<TR BGCOLOR="white" CLASS="TableRowColor">
196<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197<CODE>&nbsp;boolean</CODE></FONT></TD>
198<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#isConnected()">isConnected</A></B>()</CODE>
199
200<BR>
201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if IOConnection is currently connected.</TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205<CODE>&nbsp;void</CODE></FONT></TD>
206<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#reconnect()">reconnect</A></B>()</CODE>
207
208<BR>
209&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forces a reconnect.</TD>
210</TR>
211<TR BGCOLOR="white" CLASS="TableRowColor">
212<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213<CODE>&nbsp;void</CODE></FONT></TD>
214<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#register(io.socket.SocketIO)">register</A></B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket)</CODE>
215
216<BR>
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connects a socket to the IOConnection.</TD>
218</TR>
219<TR BGCOLOR="white" CLASS="TableRowColor">
220<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221<CODE>static&nbsp;<A HREF="../../io/socket/IOConnection.html" title="class in io.socket">IOConnection</A></CODE></FONT></TD>
222<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#register(java.lang.String, io.socket.SocketIO)">register</A></B>(java.lang.String&nbsp;origin,
223         <A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket)</CODE>
224
225<BR>
226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new connection or returns the corresponding one.</TD>
227</TR>
228<TR BGCOLOR="white" CLASS="TableRowColor">
229<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
230<CODE>&nbsp;void</CODE></FONT></TD>
231<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#send(io.socket.SocketIO, io.socket.IOAcknowledge, org.json.JSONObject)">send</A></B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket,
232     <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
233     org.json.JSONObject&nbsp;json)</CODE>
234
235<BR>
236&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sends a JSON message from <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> to the <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A>.</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/IOConnection.html#send(io.socket.SocketIO, io.socket.IOAcknowledge, java.lang.String)">send</A></B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket,
242     <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
243     java.lang.String&nbsp;text)</CODE>
244
245<BR>
246&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sends a String message from <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> to the <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A>.</TD>
247</TR>
248<TR BGCOLOR="white" CLASS="TableRowColor">
249<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
250<CODE>&nbsp;void</CODE></FONT></TD>
251<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#setState(int)">setState</A></B>(int&nbsp;state)</CODE>
252
253<BR>
254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
255</TR>
256<TR BGCOLOR="white" CLASS="TableRowColor">
257<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
258<CODE>&nbsp;void</CODE></FONT></TD>
259<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#transportConnected()">transportConnected</A></B>()</CODE>
260
261<BR>
262&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transport connected.</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/IOConnection.html#transportDisconnected()">transportDisconnected</A></B>()</CODE>
268
269<BR>
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transport disconnected.</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/IOConnection.html#transportError(java.lang.Exception)">transportError</A></B>(java.lang.Exception&nbsp;error)</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transport error.</TD>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282<CODE>&nbsp;void</CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#transportMessage(java.lang.String)">transportMessage</A></B>(java.lang.String&nbsp;text)</CODE>
284
285<BR>
286&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transport message.</TD>
287</TR>
288<TR BGCOLOR="white" CLASS="TableRowColor">
289<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290<CODE>&nbsp;void</CODE></FONT></TD>
291<TD><CODE><B><A HREF="../../io/socket/IOConnection.html#unregister(io.socket.SocketIO)">unregister</A></B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket)</CODE>
292
293<BR>
294&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disconnect a socket from the IOConnection.</TD>
295</TR>
296</TABLE>
297&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
298<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
299<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
300<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
301</TR>
302<TR BGCOLOR="white" CLASS="TableRowColor">
303<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
304</TR>
305</TABLE>
306&nbsp;
307<P>
308
309<!-- ============ FIELD DETAIL =========== -->
310
311<A NAME="field_detail"><!-- --></A>
312<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
313<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
314<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
315<B>Field Detail</B></FONT></TH>
316</TR>
317</TABLE>
318
319<A NAME="SOCKET_IO_1"><!-- --></A><H3>
320SOCKET_IO_1</H3>
321<PRE>
322public static final java.lang.String <B>SOCKET_IO_1</B></PRE>
323<DL>
324<DD>Socket.io path.
325<P>
326<DL>
327<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#io.socket.IOConnection.SOCKET_IO_1">Constant Field Values</A></DL>
328</DL>
329<HR>
330
331<A NAME="acknowledge"><!-- --></A><H3>
332acknowledge</H3>
333<PRE>
334java.util.HashMap&lt;java.lang.Integer,<A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&gt; <B>acknowledge</B></PRE>
335<DL>
336<DD>Acknowledges.
337<P>
338<DL>
339</DL>
340</DL>
341<HR>
342
343<A NAME="heartBeatTask"><!-- --></A><H3>
344heartBeatTask</H3>
345<PRE>
346final java.util.TimerTask <B>heartBeatTask</B></PRE>
347<DL>
348<DD>The heart beat task.
349<P>
350<DL>
351</DL>
352</DL>
353<HR>
354
355<A NAME="DUMMY_CALLBACK"><!-- --></A><H3>
356DUMMY_CALLBACK</H3>
357<PRE>
358public static final <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket">IOCallback</A> <B>DUMMY_CALLBACK</B></PRE>
359<DL>
360<DD>A dummy callback used when IOConnection receives a unexpected message.
361<P>
362<DL>
363</DL>
364</DL>
365
366<!-- ============ METHOD DETAIL ========== -->
367
368<A NAME="method_detail"><!-- --></A>
369<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
370<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
371<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
372<B>Method Detail</B></FONT></TH>
373</TR>
374</TABLE>
375
376<A NAME="register(java.lang.String, io.socket.SocketIO)"><!-- --></A><H3>
377register</H3>
378<PRE>
379public static <A HREF="../../io/socket/IOConnection.html" title="class in io.socket">IOConnection</A> <B>register</B>(java.lang.String&nbsp;origin,
380                                    <A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket)</PRE>
381<DL>
382<DD>Creates a new connection or returns the corresponding one.
383<P>
384<DD><DL>
385<DT><B>Parameters:</B><DD><CODE>origin</CODE> - the origin<DD><CODE>socket</CODE> - the socket
386<DT><B>Returns:</B><DD>a IOConnection object</DL>
387</DD>
388</DL>
389<HR>
390
391<A NAME="error(io.socket.SocketIOException)"><!-- --></A><H3>
392error</H3>
393<PRE>
394protected void <B>error</B>(<A HREF="../../io/socket/SocketIOException.html" title="class in io.socket">SocketIOException</A>&nbsp;e)</PRE>
395<DL>
396<DD>Populates an error to the connected <A HREF="../../io/socket/IOCallback.html" title="interface in io.socket"><CODE>IOCallback</CODE></A>s and shuts down.
397<P>
398<DD><DL>
399<DT><B>Parameters:</B><DD><CODE>e</CODE> - an exception</DL>
400</DD>
401</DL>
402<HR>
403
404<A NAME="register(io.socket.SocketIO)"><!-- --></A><H3>
405register</H3>
406<PRE>
407public void <B>register</B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket)</PRE>
408<DL>
409<DD>Connects a socket to the IOConnection.
410<P>
411<DD><DL>
412<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the socket to be connected</DL>
413</DD>
414</DL>
415<HR>
416
417<A NAME="unregister(io.socket.SocketIO)"><!-- --></A><H3>
418unregister</H3>
419<PRE>
420public void <B>unregister</B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket)</PRE>
421<DL>
422<DD>Disconnect a socket from the IOConnection. Shuts down this IOConnection
423 if no further connections are available for this IOConnection.
424<P>
425<DD><DL>
426<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the socket to be shut down</DL>
427</DD>
428</DL>
429<HR>
430
431<A NAME="transportConnected()"><!-- --></A><H3>
432transportConnected</H3>
433<PRE>
434public void <B>transportConnected</B>()</PRE>
435<DL>
436<DD>Transport connected.
437 
438 <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A> calls this when a connection is established.
439<P>
440<DD><DL>
441</DL>
442</DD>
443</DL>
444<HR>
445
446<A NAME="transportDisconnected()"><!-- --></A><H3>
447transportDisconnected</H3>
448<PRE>
449public void <B>transportDisconnected</B>()</PRE>
450<DL>
451<DD>Transport disconnected.
452 
453 <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A> calls this when a connection has been shut down.
454<P>
455<DD><DL>
456</DL>
457</DD>
458</DL>
459<HR>
460
461<A NAME="transportError(java.lang.Exception)"><!-- --></A><H3>
462transportError</H3>
463<PRE>
464public void <B>transportError</B>(java.lang.Exception&nbsp;error)</PRE>
465<DL>
466<DD>Transport error.
467<P>
468<DD><DL>
469<DT><B>Parameters:</B><DD><CODE>error</CODE> - the error <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A> calls this, when an exception
470            has occured and the transport is not usable anymore.</DL>
471</DD>
472</DL>
473<HR>
474
475<A NAME="transportMessage(java.lang.String)"><!-- --></A><H3>
476transportMessage</H3>
477<PRE>
478public void <B>transportMessage</B>(java.lang.String&nbsp;text)</PRE>
479<DL>
480<DD>Transport message.
481<P>
482<DD><DL>
483<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A> calls this, when a message has
484            been received.</DL>
485</DD>
486</DL>
487<HR>
488
489<A NAME="reconnect()"><!-- --></A><H3>
490reconnect</H3>
491<PRE>
492public void <B>reconnect</B>()</PRE>
493<DL>
494<DD>forces a reconnect. This had become useful on some android devices which
495 do not shut down TCP-connections when switching from HSDPA to Wifi
496<P>
497<DD><DL>
498</DL>
499</DD>
500</DL>
501<HR>
502
503<A NAME="getSessionId()"><!-- --></A><H3>
504getSessionId</H3>
505<PRE>
506public java.lang.String <B>getSessionId</B>()</PRE>
507<DL>
508<DD>Returns the session id. This should be called from the
509<P>
510<DD><DL>
511
512<DT><B>Returns:</B><DD>the session id <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A> to connect to the right
513         Session.</DL>
514</DD>
515</DL>
516<HR>
517
518<A NAME="send(io.socket.SocketIO, io.socket.IOAcknowledge, java.lang.String)"><!-- --></A><H3>
519send</H3>
520<PRE>
521public void <B>send</B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket,
522                 <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
523                 java.lang.String&nbsp;text)</PRE>
524<DL>
525<DD>sends a String message from <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> to the <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A>.
526<P>
527<DD><DL>
528<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the socket<DD><CODE>ack</CODE> - acknowledge package which can be called from the server<DD><CODE>text</CODE> - the text</DL>
529</DD>
530</DL>
531<HR>
532
533<A NAME="send(io.socket.SocketIO, io.socket.IOAcknowledge, org.json.JSONObject)"><!-- --></A><H3>
534send</H3>
535<PRE>
536public void <B>send</B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket,
537                 <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
538                 org.json.JSONObject&nbsp;json)</PRE>
539<DL>
540<DD>sends a JSON message from <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> to the <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A>.
541<P>
542<DD><DL>
543<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the socket<DD><CODE>ack</CODE> - acknowledge package which can be called from the server<DD><CODE>json</CODE> - the json</DL>
544</DD>
545</DL>
546<HR>
547
548<A NAME="emit(io.socket.SocketIO, java.lang.String, io.socket.IOAcknowledge, java.lang.Object...)"><!-- --></A><H3>
549emit</H3>
550<PRE>
551public void <B>emit</B>(<A HREF="../../io/socket/SocketIO.html" title="class in io.socket">SocketIO</A>&nbsp;socket,
552                 java.lang.String&nbsp;event,
553                 <A HREF="../../io/socket/IOAcknowledge.html" title="interface in io.socket">IOAcknowledge</A>&nbsp;ack,
554                 java.lang.Object...&nbsp;args)</PRE>
555<DL>
556<DD>emits an event from <A HREF="../../io/socket/SocketIO.html" title="class in io.socket"><CODE>SocketIO</CODE></A> to the <A HREF="../../io/socket/IOTransport.html" title="interface in io.socket"><CODE>IOTransport</CODE></A>.
557<P>
558<DD><DL>
559<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the socket<DD><CODE>event</CODE> - the event<DD><CODE>ack</CODE> - acknowledge package which can be called from the server<DD><CODE>args</CODE> - the arguments to be send</DL>
560</DD>
561</DL>
562<HR>
563
564<A NAME="isConnected()"><!-- --></A><H3>
565isConnected</H3>
566<PRE>
567public boolean <B>isConnected</B>()</PRE>
568<DL>
569<DD>Checks if IOConnection is currently connected.
570<P>
571<DD><DL>
572
573<DT><B>Returns:</B><DD>true, if is connected</DL>
574</DD>
575</DL>
576<HR>
577
578<A NAME="getState()"><!-- --></A><H3>
579getState</H3>
580<PRE>
581public int <B>getState</B>()</PRE>
582<DL>
583<DD><DL>
584</DL>
585</DD>
586</DL>
587<HR>
588
589<A NAME="setState(int)"><!-- --></A><H3>
590setState</H3>
591<PRE>
592public void <B>setState</B>(int&nbsp;state)</PRE>
593<DL>
594<DD><DL>
595</DL>
596</DD>
597</DL>
598<!-- ========= END OF CLASS DATA ========= -->
599<HR>
600
601
602<!-- ======= START OF BOTTOM NAVBAR ====== -->
603<A NAME="navbar_bottom"><!-- --></A>
604<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
605<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
606<TR>
607<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
608<A NAME="navbar_bottom_firstrow"><!-- --></A>
609<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
610  <TR ALIGN="center" VALIGN="top">
611  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../io/socket/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
612  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
613  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/IOConnection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
614  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
615  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
616  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
617  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
618  </TR>
619</TABLE>
620</TD>
621<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
622</EM>
623</TD>
624</TR>
625
626<TR>
627<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
628&nbsp;<A HREF="../../io/socket/IOCallback.html" title="interface in io.socket"><B>PREV CLASS</B></A>&nbsp;
629&nbsp;<A HREF="../../io/socket/IOMessage.html" title="class in io.socket"><B>NEXT CLASS</B></A></FONT></TD>
630<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
631  <A HREF="../../index.html?io/socket/IOConnection.html" target="_top"><B>FRAMES</B></A>  &nbsp;
632&nbsp;<A HREF="IOConnection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
633&nbsp;<SCRIPT type="text/javascript">
634  <!--
635  if(window==top) {
636    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
637  }
638  //-->
639</SCRIPT>
640<NOSCRIPT>
641  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
642</NOSCRIPT>
643
644
645</FONT></TD>
646</TR>
647<TR>
648<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
649  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
650<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
651DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
652</TR>
653</TABLE>
654<A NAME="skip-navbar_bottom"></A>
655<!-- ======== END OF BOTTOM NAVBAR ======= -->
656
657<HR>
658
659</BODY>
660</HTML>