MikroKopter.de
Wiki
SHOP
Datenschutz
Impressum
Projects
BL-Ctrl
FlightCtrl
MK3Mag
NaviCtrl
Català-Valencià – Catalan
中文 – Chinese (Simplified)
中文 – Chinese (Traditional)
Česky – Czech
Dansk – Danish
Nederlands – Dutch
English – English
Suomi – Finnish
Français – French
Deutsch – German
עברית – Hebrew
हिंदी – Hindi
Magyar – Hungarian
Bahasa Indonesia – Indonesian
Italiano – Italian
日本語 – Japanese
한국어 – Korean
Македонски – Macedonian
मराठी – Marathi
Norsk – Norwegian
Polski – Polish
Português – Portuguese
Português – Portuguese (Brazil)
Русский – Russian
Slovenčina – Slovak
Slovenščina – Slovenian
Español – Spanish
Svenska – Swedish
Türkçe – Turkish
Українська – Ukrainian
Oëzbekcha – Uzbek
Subversion Repositories
Projects
(root)
/
dongfang_FC_rewrite_tool
/
src
/
dongfang
/
mkt
/
comm
/
tcp
/
MKTCPConnection.java
@ 1697
- Rev 1563
Rev
Blame
|
Last modification
|
View Log
|
RSS feed
package
dongfang.mkt.comm.tcp
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.Socket
;
import
dongfang.mkt.comm.MKConnection
;
public
class
MKTCPConnection
implements
MKConnection
{
private
InputStream
inputStream
;
private
OutputStream
outputStream
;
@
Override
public
void
init
(
String
id
)
throws
IOException
{
//URL url = new URL(id);
Socket
socket =
new
Socket
(
"localhost"
,
Integer
.
parseInt
(
id
)
)
;
inputStream = socket.
getInputStream
(
)
;
outputStream = socket.
getOutputStream
(
)
;
}
@
Override
public
InputStream
getInputStream
(
)
throws
IOException
{
return
inputStream
;
}
@
Override
public
OutputStream
getOutputStream
(
)
throws
IOException
{
return
outputStream
;
}
}