Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

httpsvr not sending data???

Status
Not open for further replies.

DGoulston

Technical User
Jun 17, 2002
21
GB
ok i am using the visual studio provided code for httpsvr and have added a bit that when it finds [do-filename-do] in the html it replaces it with around 3000+ characters and sends them as such:
Code:
// CString csSendLine, csSend
// int nBytes
while (csSend.GetLength() > 1024)
{
    csSendLine = csSend.Left(1024);			
    csSend = csSend.Right(csSend.GetLength()-1024);
    nBytes = Send((LPCTSTR)csSendLine, csSendLine.GetLength());
//error checking is here
}
if (csSend.GetLength() > 0)
{
    csSendLine = csSend;			
    nBytes = Send((LPCTSTR)csSendLine, csSendLine.GetLength());
//more error checking
}
sending 1024 characters at a time and then the remainder, but the send command returns after about 2048 chars:

----------------------
ERROR:
10054 - An existing connection was forcibly closed by the remote host. - WSAECONNRESET
----------------------

is there somewhere that the web browser has a value set that tells it how many chars to accept before closing the port or something???

thanks in advance
Dal


####################
# #
# Darren@DGoulston.com #
###################
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top