1058 |
let buf = Buffer.create 1000 |
let buf = Buffer.create 1000 |
1059 |
|
|
1060 |
let server_msg_to_string t = |
let server_msg_to_string t = |
1061 |
Buffer.clear buf; |
Buffer.reset buf; |
1062 |
buf_int buf 0; |
buf_int buf 0; |
1063 |
C2S.write buf t; |
C2S.write buf t; |
1064 |
let s = Buffer.contents buf in |
let s = Buffer.contents buf in |
1067 |
s |
s |
1068 |
|
|
1069 |
let client_msg_to_string t = |
let client_msg_to_string t = |
1070 |
Buffer.clear buf; |
Buffer.reset buf; |
1071 |
buf_int buf 0; |
buf_int buf 0; |
1072 |
C2C.write buf t; |
C2C.write buf t; |
1073 |
let s = Buffer.contents buf in |
let s = Buffer.contents buf in |
1103 |
|
|
1104 |
|
|
1105 |
let init_peer_connection sock login token = |
let init_peer_connection sock login token = |
1106 |
Buffer.clear buf; |
Buffer.reset buf; |
1107 |
buf_int buf 0; |
buf_int buf 0; |
1108 |
buf_int8 buf 1; |
buf_int8 buf 1; |
1109 |
buf_string buf login; |
buf_string buf login; |
1121 |
end |
end |
1122 |
|
|
1123 |
let init_result_connection sock token = |
let init_result_connection sock token = |
1124 |
Buffer.clear buf; |
Buffer.reset buf; |
1125 |
buf_int buf 0; |
buf_int buf 0; |
1126 |
buf_int8 buf 0; |
buf_int8 buf 0; |
1127 |
buf_int buf token; |
buf_int buf token; |
1137 |
end |
end |
1138 |
|
|
1139 |
let init_download_connection sock file login req pos = |
let init_download_connection sock file login req pos = |
1140 |
Buffer.clear buf; |
Buffer.reset buf; |
1141 |
buf_int buf 0; |
buf_int buf 0; |
1142 |
buf_int8 buf 1; |
buf_int8 buf 1; |
1143 |
buf_string buf login; |
buf_string buf login; |
1154 |
|
|
1155 |
if !verbose_msg_clients then dump s; |
if !verbose_msg_clients then dump s; |
1156 |
|
|
1157 |
Buffer.clear buf; |
Buffer.reset buf; |
1158 |
buf_int buf req; |
buf_int buf req; |
1159 |
buf_int64_32 buf pos; |
buf_int64_32 buf pos; |
1160 |
buf_int buf 0; |
buf_int buf 0; |