Home > Back-end >  Can't get a Google browser RequeatHeader information server
Can't get a Google browser RequeatHeader information server

Time:09-26

Use the following method, with the Edge can be received, not Google browser
There is no error, it is receiving less than, can be connected to the
Public void the receive () {
Try {
The Socket client=serverSocket. The accept ();
System. The out. Println (" a client has established the connection ");
//to get agreement
InputStream is=client. GetInputStream ();
Byte [] datas=new byte (1024 * 1024),
Int len=is. Read (datas);
System.out.println(len);
String requestInfo=new String (datas, 0, len);
System. The out. Println (requestInfo);
} the catch (IOException e) {
System. The out. Println (" the client error ");
}
}
  • Related