Socket Class
Name: Socket
Description:
- * Socket class provides a basic network socket functionality
Package: org.active-link.net
Author: Zurab Davitiani
Version: 0.4.0
All Methods
Socket
connect
disconnect
receive
send
sendReceive
setHost
setPort
Socket
( host, port )
Description:
- * Constructor, accepts host and port, initializes object
Arguments:
connect
( optional int connectionTimeout )
Description:
- * Connects to host with specified settings, accepts connection timeout (optional, default 30)
Returns: true if successful, false otherwise
Arguments:
- optional int connectionTimeout
disconnect
( )
Description:
- * Disconnects if already connected
Returns: true if successful, false otherwise
receive
( optional int chunkSize )
Description:
- * Receives data through connected socket, accepts chunk size (optional, default 4096)
Returns: string received data if successful, false otherwise
Arguments:
send
( string sendString )
Description:
- * Sends data through connected socket
Returns: true if successful, false otherwise
Arguments:
sendReceive
( sendString, optional int connectionTimeout )
Description:
- * Combination of send and receive methods in one
Returns: string received data if successful, false otherwise
Arguments:
- sendString
- optional int connectionTimeout
setHost
( string host )
Description:
- * Sets host to make a connection to
Returns: none
Arguments:
setPort
( int port )
Description:
- * Sets port to use for the connection
Returns: none
Arguments: