#include <DTSpyHelper.h>
Definition at line 18 of file DTSpyHelper.h.
◆ DTCtcp() [1/4]
◆ DTCtcp() [2/4]
DTCtcp::DTCtcp |
( |
int |
port | ) |
|
Definition at line 17 of file DTSpyHelper.cc.
22 printf(
"zeroing...\n");
24 printf(
"zeroing done..\n");
26 sock = socket(AF_INET, SOCK_STREAM, 0);
27 printf(
"create socket..\n");
30 printf(
"no socket...\n");
34 myaddr.sin_family = AF_INET;
35 myaddr.sin_port = htons(localport);
45 printf(
"setting socket opts reuse...\n");
46 if (setsockopt(
sock, SOL_SOCKET, SO_REUSEADDR, (
char *)&blen,
sizeof(blen)) < 0)
51 printf(
"binding...\n");
57 perror(
"bind failed");
References connected, myaddr, port, and sock.
◆ DTCtcp() [3/4]
DTCtcp::DTCtcp |
( |
int |
sock, |
|
|
int |
opt |
|
) |
| |
◆ DTCtcp() [4/4]
DTCtcp::DTCtcp |
( |
DTCtcp * |
aconn | ) |
|
◆ ~DTCtcp()
Definition at line 76 of file DTSpyHelper.cc.
77 printf(
"deleting DTCtcp\n");
79 shutdown(
sock, SHUT_RDWR);
References sock.
◆ Accept()
◆ addr()
unsigned long DTCtcp::addr |
( |
| ) |
|
◆ Connect() [1/2]
void DTCtcp::Connect |
( |
const char * |
hostaddr, |
|
|
int |
port |
|
) |
| |
◆ Connect() [2/2]
void DTCtcp::Connect |
( |
unsigned long |
hostaddr, |
|
|
int |
port |
|
) |
| |
◆ Disconnect()
int DTCtcp::Disconnect |
( |
| ) |
|
◆ Id()
◆ Receive()
int DTCtcp::Receive |
( |
char * |
buffer, |
|
|
int |
size |
|
) |
| |
◆ Send()
int DTCtcp::Send |
( |
char * |
buffer, |
|
|
int |
size |
|
) |
| |
◆ clientAddr
struct sockaddr_in DTCtcp::clientAddr |
|
protected |
◆ connected
◆ myaddr
struct sockaddr_in DTCtcp::myaddr |
|
protected |
◆ port
◆ sock