package org.cyberrob.socket;
import java.io.IOException;
import java.net.ServerSocket;
import android.app.Activity;
import android.os.Bundle;
public class SocketTest extends Activity {
public static final int SERVERPORT = 7777;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try {
ServerSocket serverSocket = new ServerSocket(SERVERPORT);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
沒有留言:
張貼留言