mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
Core: Fixed issue in Socket
git-svn-id: svn://ultimatepp.org/upp/trunk@6657 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a90b024894
commit
df90f0aedc
1 changed files with 5 additions and 3 deletions
|
|
@ -585,7 +585,6 @@ bool TcpSocket::IsGlobalTimeout()
|
|||
|
||||
bool TcpSocket::RawWait(dword flags, int end_time)
|
||||
{ // wait till end_time
|
||||
LLOG("Wait(" << msecs() << " - " << end_time << ", " << flags << ")");
|
||||
if((flags & WAIT_READ) && ptr != end)
|
||||
return true;
|
||||
if(socket == INVALID_SOCKET)
|
||||
|
|
@ -770,7 +769,6 @@ int TcpSocket::Get(void *buffer, int count)
|
|||
if(!IsOpen() || IsError() || IsEof() || IsAbort())
|
||||
return 0;
|
||||
|
||||
String out;
|
||||
int l = (int)(end - ptr);
|
||||
done = 0;
|
||||
if(l > 0)
|
||||
|
|
@ -831,13 +829,17 @@ String TcpSocket::GetAll(int len)
|
|||
|
||||
String TcpSocket::GetLine(int maxlen)
|
||||
{
|
||||
LLOG("GetLine " << maxlen);
|
||||
String ln;
|
||||
int end_time = GetEndTime();
|
||||
for(;;) {
|
||||
int c = Peek(end_time);
|
||||
if(c < 0) {
|
||||
if(!IsError())
|
||||
SetSockError("GetLine", -1, "timeout");
|
||||
if(msecs() > end_time)
|
||||
SetSockError("GetLine", -1, "timeout");
|
||||
else
|
||||
continue;
|
||||
return String::GetVoid();
|
||||
}
|
||||
Get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue