---
name: "ACE_TLI_Stream"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_TLI_Stream"
---

# ACE\_TLI\_Stream(3)

Defines the member functions for ACE\_TLI\_Stream abstraction.

## NAME

ACE\_TLI\_Stream -  Defines the member functions for ACE\_TLI\_Stream abstraction.

## SYNOPSIS

```
#include <ace/TLI_Stream.h>
class ACE_TLI_Stream : public ACE_TLI
{
  public:
    friend class ACE_TLI_Acceptor;
    friend class ACE_TLI_Connector;
    ACE_TLI_Stream (void);
    int close (void);
    int active_close (void);
    int passive_close (void);
    int get_remote_addr (ACE_Addr &) const;
    ssize_t send (const void *buf, size_t n, int flags) const;
    ssize_t recv (void *buf, size_t n, int *flags) const;
    ssize_t send_n (const void *buf, size_t n, int flags) const;
    ssize_t recv_n (void *buf, size_t n, int *flags) const;
    ssize_t send (const void *buf, size_t n) const;
    ssize_t recv (void *buf, size_t n) const;
    ssize_t send_n (const void *buf, size_t n) const;
    ssize_t recv_n (void *buf, size_t n) const;
    typedef ACE_INET_Addr PEER_ADDR;
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    int rwflag_;
    int get_rwflag (void);
    void set_rwflag (int);
};
```

## Initialization and termination methods.

```
ACE_TLI_Stream (void);
```

Default constructor.

## TLI-specific shutdown operations.

```
int close (void);
```

Close down and release resources.

```
int active_close (void);
```

Send a release and then await the release from the other side.

```
int passive_close (void);
```

Acknowledge the release from the other side and then send the release to the other side.

```
int get_remote_addr (ACE_Addr &) const;
```

Return address of remotely connected peer.

\=  timod bindings

```
ssize_t send (const void *buf, size_t n, int flags) const;
```

Send an n byte buffer to the connected socket (uses t\_snd(3)).

```
ssize_t recv (void *buf, size_t n, int *flags) const;
```

Recv an n byte buffer from the connected socket (uses t\_rcv(3)).

```
ssize_t send_n (const void *buf, size_t n, int flags) const;
```

Send exactly n bytes to the connected socket (uses t\_snd(3)).

```
ssize_t recv_n (void *buf, size_t n, int *flags) const;
```

Recv exactly n bytes from the connected socket (uses t\_rcv(3)).

## tirdwr bindings

```
ssize_t send (const void *buf, size_t n) const;
```

Send an n byte buffer to the connected socket (uses [write(2)](/write/2.md)).

```
ssize_t recv (void *buf, size_t n) const;
```

Recv an n byte buffer from the connected socket (uses [read(2)](/read/2.md)).

```
ssize_t send_n (const void *buf, size_t n) const;
```

Send n bytes, keep trying until n are sent (uses [write(2)](/write/2.md)).

```
ssize_t recv_n (void *buf, size_t n) const;
```

Recv n bytes, keep trying until n are received (uses read (2)).

## Meta-type info

```
typedef ACE_INET_Addr PEER_ADDR;
```

```
void dump (void) const;
```

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## Get/set rwflag

```
int get_rwflag (void);
```

```
void set_rwflag (int);
```

## AUTHOR

Doug Schmidt

## LIBRARY

ace
