The wwSocket class is a basic client side TCP/IP access library that lets you read and write raw sockets with a few simple method calls. Note only TCP/IP is supported - no UTP support.
Based on: Custom
Stored in: wwIPStuff.vcx
IMPORTANT: You can only run one socket instance per FoxPro application!!! If you connect a second socket you will kill any previous existing socket connections created with this class.
Requires Winsock 2.0 on the client machine. (ws2_32.dll in your SYSTEM32/SYSTEM dir).
|Connects to a socket on a server.
|Disconnects from a socket on the server.
|Returns the content of the log captured when lLogSession is .T.
|Puts a socket into server mode to listen for incoming connections on a given port. If a connection is made the socket is opened for reading and writing using the regular Send/Receive etc. methods.
|Receives data from a socket.
|Sends data to a socket on the server.
|Sends a string to the open socket, waits for a response and returns the string response.
|High level method that connects to a socket, sends data and receives a result then disconnects from the socket. Great for various XML services that follow a simple transaction model with a 'hit'.
|Receives data until either the provided string is found or the request times out based on the nTimeout property setting.
|Reads a socket until the specified number of bytes are received.
|Error Message if an error occurred.
|Allows you to log the entire TCP/IP session and retrieve the log via the GetLog() method.
|Strips CHR(0) NULLS from the received buffer. Otherwise the full buffer will be passed back which is padded with CHR(0)'s.
|The default Receive buffer size in bytes. This size is used to determine how much data the socket waits for at a time before returning control to you.
|The size of the data returned on the last Receive() method call. Use this if you're reading binary data that might contain NULLS and might not fill the buffer fully.
|Socket timeout, in seconds, used to determine when an operation fails due to an idle timeout of no data sent or received.
Comment or report problem with topic