Raised This Month: $ Target: $400
 0% 

Socket help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-21-2018 , 17:34   Re: Socket help
Reply With Quote #10

Chances are slim but there is a possibility your data is getting cut-off as you read chunks from the socket into your buffer. This would cause an issue if the break is in the middle of the string you are searching for. You should download the file (using an HTTP include), and then scan the file for the data you want. Or, if this file is not huge, make your buffer bigger and read everything into the buffer, concatenating the data with each socket_read().

To see if this is the case, print the data into the console as it comes in to see if it's all in one piece:
Code:
socket_recv ( Socket, DataRecived, charsmax ( DataRecived ) ); server_print( "Data [%s]" , DataRecived )
__________________

Last edited by Bugsy; 12-21-2018 at 17:36.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode