| | Wide Studio Object Reference
| |
Class Name
WSCvcsocket
Specification of methods
exec Function Description
- Form
- long exec()
- Function
- Connect to the server-side socket specified with the property: WSNip, WSNport
and raises an ACTIVATE event when it succeeds.
Actual communication processes should be implemented in the event procedure
started by the ACTIVATE event
- Description
-
- Parameters
- None.
- Return value
- WS_NO_ERR = Success, WS_ERR = Failed to connect.
- Notice
- None.
- Samples
-
//Establishing a connection and raising ACTIVATE event.
long ret = newvcso_000->exec();
read Function Description
- Form
- long read(WSCuchar* buffer,long size)
- Function
- Read data from a connected socket in the event procedure started by ACTIVATE
- Description
-
- Parameters
-
(in)WSCuchar* buffer | Data reading buffer |
(in)long len | Data reading buffer length |
- Return value
- Read data length (bytes)
- Notice
- When it is used in other than the event procedure started by the ACTIVATE event,
it causes an error because the connection has not been established.
- Samples
-
char buffer[128];
long ret = newvcso_000->read(buffer,128);
write Function Description
- Form
- long write(WSCuchar* buffer,long size)
- Function
- Write data to a connected socket in the event procedure started by the ACTIVATE event
- Description
-
- Parameters
-
(in)WSCuchar* buffer | Writing data buffer |
(in)long len | Writing data buffer length |
- Return value
- Written data length (bytes)
- Notice
- When it is used in other than the event procedure started by the ACTIVATE event,
it causes an error because the connection has not been established.
- Samples
-
char buffer[128];
strcpy(buffer,"send data...");
long ret = newvcso_000->write(buffer,128);
Document Release 3.20 For use with Wide Studio Release 3.20, Spring 2003 Wide Studio Home | Up to Copyright(C) T. Hirabayashi, 1999-2003 | | Last modified: February 3, 2003 | |