Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
356 chris 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_26) on Sun Jan 27 20:37:02 CET 2013 -->
6
<TITLE>
7
Socket (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2013-01-27">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="Socket (libgdx API)";
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="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Socket.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../../com/badlogic/gdx/net/ServerSocketHints.html" title="class in com.badlogic.gdx.net"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../com/badlogic/gdx/net/SocketHints.html" title="class in com.badlogic.gdx.net"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../../index.html?com/badlogic/gdx/net/Socket.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="Socket.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx.net</FONT>
107
<BR>
108
Interface Socket</H2>
109
<DL>
110
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></DD>
111
</DL>
112
<HR>
113
<DL>
114
<DT><PRE>public interface <B>Socket</B><DT>extends <A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></DL>
115
</PRE>
116
 
117
<P>
118
A client socket that talks to a server socket via some <A HREF="../../../../com/badlogic/gdx/Net.Protocol.html" title="enum in com.badlogic.gdx"><CODE>Net.Protocol</CODE></A>. See
119
 <A HREF="../../../../com/badlogic/gdx/Net.html#newClientSocket(com.badlogic.gdx.Net.Protocol, java.lang.String, int, com.badlogic.gdx.net.SocketHints)"><CODE>Net.newClientSocket(Protocol, String, int, SocketHints)</CODE></A> and <A HREF="../../../../com/badlogic/gdx/Net.html#newServerSocket(com.badlogic.gdx.Net.Protocol, int, com.badlogic.gdx.net.ServerSocketHints)"><CODE>Net.newServerSocket(Protocol, int, ServerSocketHints)</CODE></A>.</p>
120
 
121
 A socket has an <CODE>InputStream</CODE> used to send data to the other end of the connection, and
122
 an <CODE>OutputStream</CODE> to receive data from the other end of the connection.</p>
123
 
124
 A socket needs to be disposed if it is no longer used. Disposing also closes the connection.
125
<P>
126
 
127
<P>
128
<DL>
129
<DT><B>Author:</B></DT>
130
  <DD>mzechner</DD>
131
</DL>
132
<HR>
133
 
134
<P>
135
 
136
<!-- ========== METHOD SUMMARY =========== -->
137
 
138
<A NAME="method_summary"><!-- --></A>
139
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142
<B>Method Summary</B></FONT></TH>
143
</TR>
144
<TR BGCOLOR="white" CLASS="TableRowColor">
145
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146
<CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
147
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/net/Socket.html#getInputStream()">getInputStream</A></B>()</CODE>
148
 
149
<BR>
150
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
151
</TR>
152
<TR BGCOLOR="white" CLASS="TableRowColor">
153
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154
<CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
155
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/net/Socket.html#getOutputStream()">getOutputStream</A></B>()</CODE>
156
 
157
<BR>
158
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
159
</TR>
160
<TR BGCOLOR="white" CLASS="TableRowColor">
161
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162
<CODE>&nbsp;boolean</CODE></FONT></TD>
163
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/net/Socket.html#isConnected()">isConnected</A></B>()</CODE>
164
 
165
<BR>
166
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
167
</TR>
168
</TABLE>
169
&nbsp;<A NAME="methods_inherited_from_class_com.badlogic.gdx.utils.Disposable"><!-- --></A>
170
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
171
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
172
<TH ALIGN="left"><B>Methods inherited from interface com.badlogic.gdx.utils.<A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></B></TH>
173
</TR>
174
<TR BGCOLOR="white" CLASS="TableRowColor">
175
<TD><CODE><A HREF="../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">dispose</A></CODE></TD>
176
</TR>
177
</TABLE>
178
&nbsp;
179
<P>
180
 
181
<!-- ============ METHOD DETAIL ========== -->
182
 
183
<A NAME="method_detail"><!-- --></A>
184
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
185
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
186
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
187
<B>Method Detail</B></FONT></TH>
188
</TR>
189
</TABLE>
190
 
191
<A NAME="isConnected()"><!-- --></A><H3>
192
isConnected</H3>
193
<PRE>
194
boolean <B>isConnected</B>()</PRE>
195
<DL>
196
<DD><DL>
197
</DL>
198
</DD>
199
<DD><DL>
200
 
201
<DT><B>Returns:</B><DD>whether the socket is connected</DL>
202
</DD>
203
</DL>
204
<HR>
205
 
206
<A NAME="getInputStream()"><!-- --></A><H3>
207
getInputStream</H3>
208
<PRE>
209
java.io.InputStream <B>getInputStream</B>()</PRE>
210
<DL>
211
<DD><DL>
212
</DL>
213
</DD>
214
<DD><DL>
215
 
216
<DT><B>Returns:</B><DD>the <CODE>InputStream</CODE> used to read data from the other end of the connection.</DL>
217
</DD>
218
</DL>
219
<HR>
220
 
221
<A NAME="getOutputStream()"><!-- --></A><H3>
222
getOutputStream</H3>
223
<PRE>
224
java.io.OutputStream <B>getOutputStream</B>()</PRE>
225
<DL>
226
<DD><DL>
227
</DL>
228
</DD>
229
<DD><DL>
230
 
231
<DT><B>Returns:</B><DD>the <CODE>OutputStream</CODE> used to write data to the other end of the connection.</DL>
232
</DD>
233
</DL>
234
<!-- ========= END OF CLASS DATA ========= -->
235
<HR>
236
 
237
 
238
<!-- ======= START OF BOTTOM NAVBAR ====== -->
239
<A NAME="navbar_bottom"><!-- --></A>
240
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
241
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
242
<TR>
243
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
244
<A NAME="navbar_bottom_firstrow"><!-- --></A>
245
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
246
  <TR ALIGN="center" VALIGN="top">
247
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
248
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
249
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
250
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Socket.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
251
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
252
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
253
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
254
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
255
  </TR>
256
</TABLE>
257
</TD>
258
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
259
libgdx API</EM>
260
</TD>
261
</TR>
262
 
263
<TR>
264
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
265
&nbsp;<A HREF="../../../../com/badlogic/gdx/net/ServerSocketHints.html" title="class in com.badlogic.gdx.net"><B>PREV CLASS</B></A>&nbsp;
266
&nbsp;<A HREF="../../../../com/badlogic/gdx/net/SocketHints.html" title="class in com.badlogic.gdx.net"><B>NEXT CLASS</B></A></FONT></TD>
267
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
268
  <A HREF="../../../../index.html?com/badlogic/gdx/net/Socket.html" target="_top"><B>FRAMES</B></A>  &nbsp;
269
&nbsp;<A HREF="Socket.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
270
&nbsp;<SCRIPT type="text/javascript">
271
  <!--
272
  if(window==top) {
273
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
274
  }
275
  //-->
276
</SCRIPT>
277
<NOSCRIPT>
278
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
279
</NOSCRIPT>
280
 
281
 
282
</FONT></TD>
283
</TR>
284
<TR>
285
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
286
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
287
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
288
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
289
</TR>
290
</TABLE>
291
<A NAME="skip-navbar_bottom"></A>
292
<!-- ======== END OF BOTTOM NAVBAR ======= -->
293
 
294
<HR>
295
 
296
                                <div style="font-size:9pt"><i>
297
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
298
                                </i></div>
299
 
300
</BODY>
301
</HTML>