How to send a string, using java socket as client and delphi indy tcpserver as server -


server onexecute event like

 try    s := acontext.connection.iohandler.readln(indytextencoding_utf8);   ok:=true;   except   on e:exception winapi.windows.beep(500,500); end; 

the basic problem send client server

i solved adding lf character in end of string in java code

 string str = "test\n";     try {         socket = new socket("localhost", 13428);         osw =new outputstreamwriter(socket.getoutputstream(), "utf-8");          osw.write( str, 0, str.length());         osw.flush();       } catch (ioexception e) {         system.err.print(e);     } {         socket.close();     } 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -