System::SocketReceive

System::SocketReceive receives a buffer from a remote host via a TCP connection that was previouly opened with CTScript::System::SocketConnect.

public System::SocketReceive(
   OSHandle socketHandle
:  BString buffer
);

Parameters

socketHandlethe socket handle of this connection.
bufferthe data recieved.

Return Values

The error.errorCode value will be set to the underlining windows error message code and the error.errorString will have a detailed description of the error.

Remarks

Example Use
  • TScript
main(){
   OSHandle socket;
   System::SocketConnect("ekkySoftware.com":socket);
   System::SocketSend(socket,"GET / HTTP/1.1\r\n"
      "User-Agent: TScript Software http://ekkySoftware.com/\r\n"
      "Host: ekkysofware.com\r\n\r\n");
   System::SocketReceive(socket:fileBuffer);
   System::MessageBox(fileBuffer.AString().ToString(),
      u"File Contents of / at ekkySoftware.com");
}

Since

TScript Version 1.2

Also See

System::SocketConnect, System::SocketGetInfo, System::SocketSend
Listen All
Comments (0)
Characters left: 2500
 
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript