Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmclientUi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuai.liu
FmclientUi
Commits
8ea46224
Commit
8ea46224
authored
Oct 31, 2019
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:TCP套接字单次发送长度
parent
a7de2ce8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
qfmclient.cpp
+7
-2
No files found.
qfmclient.cpp
View file @
8ea46224
...
@@ -866,10 +866,15 @@ int QFmClient::sendAESData2Proxy(int sock, char *buf, int length)
...
@@ -866,10 +866,15 @@ int QFmClient::sendAESData2Proxy(int sock, char *buf, int length)
toSendLength
=
toSendLength
+
header_size
;
toSendLength
=
toSendLength
+
header_size
;
int
curSendLength
=
0
;
int
curSendLength
=
0
;
int
rlt
=
0
;
int
rlt
=
0
;
int
fixLength
=
512
;
/*send length should less than 536.
otherwise will be occur [TCP Retransmission] error on XP platform at sometime.*/
while
(
curSendLength
<
toSendLength
)
while
(
curSendLength
<
toSendLength
)
{
{
int
res
=
send
(
sock
,
out
+
curSendLength
,
toSendLength
-
curSendLength
,
0
);
if
(
toSendLength
-
curSendLength
<
512
)
{
fixLength
=
toSendLength
-
curSendLength
;
}
int
res
=
send
(
sock
,
out
+
curSendLength
,
fixLength
/*toSendLength - curSendLength*/
,
0
);
if
(
res
==
SOCKET_ERROR
)
if
(
res
==
SOCKET_ERROR
)
{
{
int
err
=
WSAGetLastError
();
int
err
=
WSAGetLastError
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment