- Timestamp:
- Apr 14, 2021, 3:49:11 PM (4 years ago)
- Location:
- trunk/Network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Network/UNetworkClient.pas
r365 r369 6 6 7 7 uses 8 Classes, SysUtils , fpsock, fpAsync, Protocol;8 Classes, SysUtils{$IFDEF LINUX}, fpAsync, fpsock{$ENDIF}, Protocol; 9 9 10 {$IFDEF LINUX} 10 11 type 11 12 { TTCPClientThread } … … 39 40 var 40 41 NetworkClient: TNetworkClient; 42 {$ENDIF} 41 43 42 44 procedure Client(Command, Player: Integer; var Data); stdcall; … … 48 50 LocalPlayer, Global, UNetworkCommon; 49 51 50 function LocalServer(Command, Player, Subject: Integer; var Data): Integer; stdcall;51 begin52 if Assigned(NetworkClient) then53 Result := NetworkClient.Server(TCommand(Command), Player, Subject, Data);54 end;55 56 52 procedure Client(Command, Player: Integer; var Data); 57 53 var 58 54 Cmd: TCommand; 59 55 begin 56 {$IFDEF LINUX} 60 57 Cmd := TCommand(Command); 61 58 case Cmd of … … 71 68 end; 72 69 end; 70 {$ENDIF} 71 end; 72 73 {$IFDEF LINUX} 74 function LocalServer(Command, Player, Subject: Integer; var Data): Integer; stdcall; 75 begin 76 if Assigned(NetworkClient) then 77 Result := NetworkClient.Server(TCommand(Command), Player, Subject, Data); 73 78 end; 74 79 … … 167 172 inherited; 168 173 end; 174 {$ENDIF} 169 175 170 176 end. -
trunk/Network/UNetworkServer.pas
r367 r369 6 6 7 7 uses 8 Classes, SysUtils, fgl, fpAsync, fpsock, Protocol, fphttpclient; 9 8 Classes, SysUtils, fgl{$IFDEF LINUX}, fpAsync, fpsock{$ENDIF}, Protocol, fphttpclient; 9 10 {$IFDEF LINUX} 10 11 type 11 12 TNetworkServer = class; … … 79 80 var 80 81 NetworkServer: TNetworkServer; 82 {$ENDIF} 81 83 82 84 procedure Client(Command, Player: integer; var Data); stdcall; … … 90 92 procedure Client(Command, Player: integer; var Data); 91 93 begin 94 {$IFDEF LINUX} 92 95 if not Assigned(NetworkServer) then begin 93 96 NetworkServer := TNetworkServer.Create; … … 99 102 end; 100 103 NetworkServer.Client(TCommand(Command), Player, Data); 101 end; 104 {$ENDIF} 105 end; 106 107 {$IFDEF LINUX} 102 108 103 109 { TNetworkServerPlayers } … … 327 333 end; 328 334 335 {$ENDIF} 336 329 337 end. 330 338
Note:
See TracChangeset
for help on using the changeset viewer.