Ver Mensaje Individual
  #1  
Antiguo 02-01-2010
vicoxl16 vicoxl16 is offline
Registrado
 
Registrado: abr 2009
Posts: 4
Reputación: 0
vicoxl16 Va por buen camino
Thumbs up Necesito Ayuda

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;
Responder Con Cita