Hola ,bueno quisiera que alguien me ayude a pasar este codigo a java
Código:
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;Socket: TCustomWinSocket);
label kezd,vege;
var
y:word;
delimiter:word;
Msg:TKoMsg;
begin
if Socket.ReceiveLength=0 then exit;
kezd:
Socket.ReceiveBuf(delimiter,2); //$55AA
Socket.ReceiveBuf(y,2); //length
Msg:=TKoMsg.Create;
Msg.Sender:=TPlayer(Players.Objects[Players.IndexOf(IntToStr(Socket.Handle))]);
Msgs.Add(Msg);
SetLength(Msg.Arr,y);
Socket.ReceiveBuf(Msg.Arr[0],y);
Socket.ReceiveBuf(delimiter,2); //$AA55
if y=0 then
goto vege;
vege:
if Socket.ReceiveLength>0 then
goto kezd;
PostMessage(Handle,WM_PROCESS,0,0);
end;