Bug 3237 - socket_recv2(_socket, _data[], _length);
socket_recv2(_socket, _data[], _length);
Status: RESOLVED INVALID
Product: AMX Mod X
Classification: Unclassified
Component: Module: Sockets
trunk
PC All
: P4 normal
Assigned To: amxmodx-bugs@alliedmods.net
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-18 20:57 PDT by MPNumB
Modified: 2013-06-22 13:00 PDT (History)
4 users (show)

See Also:


Attachments

Description MPNumB 2008-08-18 20:57:17 PDT
I'm requesting for socket_recv2(_socket, _data[], _length);

For example:
Lengh of downloaded data is 4.
I'm now using:

<code>
new iBuffer[2];
while( socket_recv2(iSocketId, iBuffer, 2)>0 )
	write_file("test.txt", iBuffer); // this is called only twice.
</code>

In other words can you make it so already receved data is removed from the socket, what will give space for the new data. (something like fgetc(fileid)) =)
Comment 1 |PJ| Shorty 2008-09-11 22:05:27 PDT
you check before you receive the data if the buffer changed

http://www.amxmodx.org/funcwiki.php?go=func&id=492

Note You need to log in before you can comment on or make changes to this bug.