Java client python server socket programming

前端 未结 5 1430
花落未央
花落未央 2021-02-06 19:38

I have a client program in java that sends a message \"Hello\" to python server.

Java code

    import java.io.*;  
    import java.net.*; 
    public cla         


        
5条回答
  •  余生分开走
    2021-02-06 20:36

    In the Java code you have written

    dout.writeUTF("Hello");
    

    But the Python server expects "Hello Server" to print "Hii Everyone".

    Change Java Client code to

    dout.writeUTF("Hello Server");
    

提交回复
热议问题