Skip to content

w3Sockets from Dimac

Dmitrii Evdokimov edited this page Oct 24, 2017 · 1 revision

Authors' readme.txt

This is not much of a readme file is it. Well we thought that we'd
provide all the latest information you need on the web instead.

Code samples and a complete reference can be found 
on http://tech.dimac.net/

Note:
	w3Sockets requires Winsock2.
	Winsock can be downloaded free from 
		ftp://ftp.microsoft.com/bussys/winsock/winsock2/

Trenjeska wrotes in http://www.tek-tips.com/viewthread.cfm?qid=1779632:

Properties

GUID: {B8EDC06C-2FF9-11D1-9755-0060979FF483}
Flags: [hidden, dual, ole, dispatch]

Syntax

Interface Properties

Property ReturnType Name Description
string Buffer (read-only) string Buffer Used to get the data received during some Wait functions
long BytesInBuffer (read-only) long BytesInBuffer
bool Connected bool Connected
bool DoTelnetEmulation bool DoTelnetEmulation Boolean value that can be used to instruct w3 Sockets to respond to telnet queries
string Host string Host Text string representing the host and port you want to connect to. This is in the form of "[hostname/ip]:[port]"
long Port long Port
string TelnetEmulation string TelnetEmulation Type of terminal to emulate
long TimeOut long TimeOut Default timeout for all operations in miliseconds

Interface Methods

Method ReturnType Name Description
void Close(); void Close Closes an active connection
string GetLine(); string GetLine Waits and returns one row of data
string GetText([in]long len); string GetText Returns [Len] characters from the socket
void Open(); void Open Initiates a connection with "host"
string peek([in]long len); string peek
void SendLine([in]string Line); void SendLine Sends a line of data and appends a crlf at the end
void SendText([in]string text); void SendText Sends a text string without linebreaks
void Wait(); void Wait Waits until data is returned
bool WaitFor([in]string Substring); bool WaitFor Waits for a specifit string and then returns
void WaitForDisconnect(); void WaitForDisconnect Waits until all data is received and the connection is closed. The data can then be read from the "buffer" property
Clone this wiki locally