Java socket ???????????
???????????? ???????[ 2014/5/12 13:37:25 ] ????????Java socket
packagesockerk;
importjava.io.DataInputStream;
importjava.io.IOException;
importjava.net.Socket;
importjava.net.UnknownHostException;
publicclassSocketClient{
publicstaticvoidmain(String[]args){
Socketsocket=null;
try{
socket=newSocket("127.0.0.1"??8888);
DataInputStreamdis=newDataInputStream(socket.getInputStream());
Stringstring="";
while(!"end".equals(string)){
string=dis.readUTF();
System.out.println(string);
}
socket.close();
}catch(UnknownHostExceptione){
//TODOAuto-generatedcatchblock
e.printStackTrace();
}catch(IOExceptione){
//TODOAuto-generatedcatchblock
e.printStackTrace();
}
}
}
|
?????????
packagesocket;
importjava.io.BufferedReader;
importjava.io.DataOutputStream;
importjava.io.IOException;
importjava.io.InputStreamReader;
importjava.net.ServerSocket;
importjava.net.Socket;
publicclassSocketSingleServer{
publicstaticvoidmain(String[]args)throwsIOException{
ServerSocketserverSocket=null;
Socketclient=null;
try{
serverSocket=newServerSocket(8888);
client=serverSocket.accept();
BufferedReaderbr=newBufferedReader(newInputStreamReader(System.in));
DataOutputStreamdos=newDataOutputStream(client.getOutputStream());
while(!client.isClosed()){
Stringstr="";
if((str=br.readLine())!=null){
dos.writeUTF(str);
dos.flush();
}
}
}catch(IOExceptione){
//TODOAuto-generatedcatchblock
e.printStackTrace();
}finally{
client.close();
}
}
}
|
?????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????