Jump to content

Wildbook

Members
  • Posts

    3
  • Joined

  • Last visited

Wildbook's Achievements

  1. Thanks, this got me in the right direction and I think I know how to do this now! I'll be back here if I run into more problems. If someone gets here with the same problem as me: I changed TCPRecv($hSocket, 2048) to $Recv = "" ;Declare and/or clean variable for reading buffer. $sData = "" ;Declare and/or clean variable for storing received data. Do ;Try to get more data from the "received" buffer. $sRecv = TCPRecv($hSocket, 2048) ;Try to get 2048 bytes from the "received" buffer. $sData = $sData & $sRecv ;Add the data received from the "reading buffer" variable to the "storing" variable. Until $sRecv = "" ;Until the "received" buffer is empty. ConsoleWrite($sData) ;Write the received data to console (for debug purpose, so you know what you received) Thanks again, both z3r0c00l12 for pointing me in the right direction (Loop reading from TCPRecv until the end of it) and PincoPanco for showing me a coded example of how this would work, and showing me about buffers.
  2. Thanks, I got that part now , but how do I look for the ending if TCPRecv returns binary?
  3. Hi, I'm trying to make a Server/Client tool where the server sends a string of text or a file, and the client responds with a string of text or a file depending on the data it received from the server. I have tried pretty much every UDF and every example I can find here, but the only one that I've found that works for this is >this, and it randomly cuts off the string received/sent. What i want is a server showing a list of connected clients, and when I select a client, I'm able to send a string (a command) or file to it. The client should then be able to both read the string and answer with a string or file or write the received file to a file depending on the command it received from the server. Please, I need this as soon as possible and I have yet to find something who does this...
×
×
  • Create New...