日期:2014-05-20 浏览次数:20814 次
package d_port_package;
import java.io.DataInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class D_Updata_c_port_Data {
static int[] Localmemberonline = new int[200];
static String D_PORT_SERVER = "127.0.0.1";
static String S_PORT_SERVER = "127.0.0.1";
static String C_PORT_CLIENT = "127.0.0.1";
DataInputStream dips0 = null;
ServerSocket ss1 = null;
Socket s1 = null;
Socket s2 = null;
byte b = 'b';
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new D_Updata_c_port_Data().startGetValue();
}
public void startGetValue(){
try {
ss1 = new ServerSocket(9999,50);
while(true){
s1 = ss1.accept();
int condition = dips0.read();
switch(condition){
case 'a':
{
D_ManageTheChannel11DS m11 = new D_ManageTheChannel11DS(s1,"Thread_11");
m11.start();
D_ManageTheChannel12DS m12 = new D_ManageTheChannel12DS(s2,"Thread_12");
m12.start();
}
case 'b':
{
D_ManageTheChannel21DS m21 = new D_ManageTheChannel21DS(s1,"Thread_21");
m21.start();
D_ManageTheChannel22DS m22 = new D_ManageTheChannel22DS(s2,"Thread_22");
m22.start();
}
case 'F':
{
D_portManageTheSysRegister m3 = new D_portManageTheSysRegister(s1,"Thread_3");