summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc289b1)
raw | patch | inline | side by side (parent: cc289b1)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 12 Oct 2019 02:27:27 +0000 (05:27 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 12 Oct 2019 15:54:12 +0000 (18:54 +0300) |
src/game/g_netmsg.pas | patch | blob | history |
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index 15079d6b614449376ecb6e3bb94f539c55b425d3..bd32f68095a8d15b13a788babc2188afc70dee20 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
NET_MSG_TIME_SYNC = 194;
NET_MSG_VOTE_EVENT = 195;
+ {
NET_MSG_MAP_REQUEST = 201;
NET_MSG_MAP_RESPONSE = 202;
NET_MSG_RES_REQUEST = 203;
NET_MSG_RES_RESPONSE = 204;
-
- // chunked file transfers
- // it goes this way:
- // client requests file (FILE_REQUEST)
- // server sends file header info (FILE_HEADER)
- // client acks chunk -1 (CHUNK_ACK) to initiate transfer, or cancels (FILE_CANCEL)
- // server start sending data chunks (one at a time, waiting for an ACK for each one)
- // when client acks the last chunk, transfer is complete
- // this scheme sux, of course; we can do better by spamming with unreliable unsequenced packets,
- // and use client acks to drive server sends, but meh... let's do it this way first, and
- // we can improve it later.
-
- // client: request a file
- NET_MSG_FILE_REQUEST = 210;
- // server: file info response
- NET_MSG_FILE_HEADER = 211;
- // client: request transfer cancellation
- // server: something went wrong, transfer cancelled, bomb out
- NET_MSG_FILE_CANCEL = 212;
- // server: file chunk data
- NET_MSG_FILE_CHUNK_DATA = 213;
- // client: file chunk ack
- NET_MSG_FILE_CHUNK_ACK = 214;
-
+ }
NET_CHAT_SYSTEM = 0;
NET_CHAT_PLAYER = 1;
ExternalResources: array of TExternalResourceInfo;
end;
-function MapDataFromMsgStream(msgStream: TMemoryStream):TMapDataMsg;
-function ResDataFromMsgStream(msgStream: TMemoryStream):TResDataMsg;
-
function IsValidFileName(const S: String): Boolean;
function IsValidFilePath(const S: String): Boolean;
end;
end;
+{
function CreateMapDataMsg(const FileName: TFileName; ResList: TStringList): TMapDataMsg;
var
i: Integer;
msgStream.ReadBuffer(Result.ExternalResources[0], resCount * SizeOf(TExternalResourceInfo)); //res data
end;
+}
function IsValidFileName(const S: String): Boolean;
const