Struct interface to NSC Stream (i.e., TCP) Sockets.
More...
#include <sim_interface.h>
|
| virtual | ~INetStreamSocket () |
| |
| virtual int | accept (INetStreamSocket **)=0 |
| | Accept an incoming connection. More...
|
| |
| virtual void | connect (const char *, int)=0 |
| | Connect to a remote peer. More...
|
| |
| virtual void | disconnect ()=0 |
| | Disconnect from a remote peer. More...
|
| |
| virtual bool | get_var (const char *var, char *result, int result_len) |
| | Optional function used to get variables for this TCP connection. More...
|
| |
| virtual int | getpeername (struct sockaddr *sa, size_t *salen) |
| | Get the peer name. More...
|
| |
| virtual int | getsockname (struct sockaddr *sa, size_t *salen) |
| | Get the socket local name. More...
|
| |
| virtual bool | is_connected ()=0 |
| | Check the connection state. More...
|
| |
| virtual bool | is_listening ()=0 |
| | Check the listening state. More...
|
| |
| virtual void | listen (int)=0 |
| | Put the socket in Listening state on a port. More...
|
| |
| virtual void | print_state (FILE *)=0 |
| | Print the socket state. More...
|
| |
| virtual int | read_data (void *buf, int *buflen)=0 |
| | Read some data. More...
|
| |
| virtual int | send_data (const void *data, int datalen)=0 |
| | Send some data. More...
|
| |
| virtual bool | set_var (const char *var, const char *val) |
| | Optional function used to set variables for this TCP connection. More...
|
| |
| virtual int | setsockopt (char *optname, void *val, size_t valsize)=0 |
| | Set the socket options. More...
|
| |
Struct interface to NSC Stream (i.e., TCP) Sockets.
Definition at line 255 of file sim_interface.h.
| virtual INetStreamSocket::~INetStreamSocket |
( |
| ) |
|
|
inlinevirtual |
| virtual void INetStreamSocket::connect |
( |
const char * |
, |
|
|
int |
|
|
) |
| |
|
pure virtual |
| virtual void INetStreamSocket::disconnect |
( |
| ) |
|
|
pure virtual |
| virtual bool INetStreamSocket::get_var |
( |
const char * |
var, |
|
|
char * |
result, |
|
|
int |
result_len |
|
) |
| |
|
inlinevirtual |
Optional function used to get variables for this TCP connection.
- Note
- not implemented
- Parameters
-
| var | variable requested |
| result | result result |
| result_len | result length |
- Returns
- always false
Definition at line 350 of file sim_interface.h.
| virtual int INetStreamSocket::getpeername |
( |
struct sockaddr * |
sa, |
|
|
size_t * |
salen |
|
) |
| |
|
inlinevirtual |
| virtual int INetStreamSocket::getsockname |
( |
struct sockaddr * |
sa, |
|
|
size_t * |
salen |
|
) |
| |
|
inlinevirtual |
| virtual bool INetStreamSocket::is_connected |
( |
| ) |
|
|
pure virtual |
| virtual bool INetStreamSocket::is_listening |
( |
| ) |
|
|
pure virtual |
| virtual void INetStreamSocket::listen |
( |
int |
| ) |
|
|
pure virtual |
| virtual void INetStreamSocket::print_state |
( |
FILE * |
| ) |
|
|
pure virtual |
| virtual int INetStreamSocket::read_data |
( |
void * |
buf, |
|
|
int * |
buflen |
|
) |
| |
|
pure virtual |
| virtual int INetStreamSocket::send_data |
( |
const void * |
data, |
|
|
int |
datalen |
|
) |
| |
|
pure virtual |
| virtual bool INetStreamSocket::set_var |
( |
const char * |
var, |
|
|
const char * |
val |
|
) |
| |
|
inlinevirtual |
Optional function used to set variables for this TCP connection.
- Note
- not implemented
- Parameters
-
| var | variable to set |
| val | value to set |
- Returns
- always false
Definition at line 363 of file sim_interface.h.
| virtual int INetStreamSocket::setsockopt |
( |
char * |
optname, |
|
|
void * |
val, |
|
|
size_t |
valsize |
|
) |
| |
|
pure virtual |
Set the socket options.
We need to pass the option name in as a string here. The reason for this is that different operating systems you compile on will have different numbers defined for the constants SO_SNDBUF and so on.
- Parameters
-
| optname | name of the option |
| val | option value |
| valsize | size of the option value |
- Returns
The documentation for this struct was generated from the following file: