liblogging: beepsession-lstn.c File Reference

Main Page | Compound List | File List | Compound Members | File Members | Related Pages

# beepsession-lstn.c File Reference

Implementation of listenere part of the BEEP Session Object. More...

`#include <assert.h>`
`#include "config.h"`
`#include "liblogging.h"`
`#include "sockets.h"`
`#include "beepsession.h"`
`#include "beepchannel.h"`
`#include "beepframe.h"`
`#include "namevaluetree.h"`

## Functions
srRetVal | sbSessSendRPY (sbSessObj *pThis, char *pszPayload)
| Send an reply to the remote peer.
srRetVal | sbSessRemoteOpen (sbSessObj **pThis, sbSockObj *pSock, sbNVTRObj *pProfSupported)
void | sbSessAbort (sbSessObj *pThis)
| Close a session without any further communication.

## Detailed Description

Implementation of listenere part of the BEEP Session Object.

This file implements the listenere part of the BEEP sesion object. logically, it belongs to beepsession.c. The code is included in its own .c file to save some space when linking a pure client app. With its own .c file, the comiled code will not be linked to the application, which it otherwise would be.

Copyright 2002-2003 Rainer Gerhards and Adiscon GmbH. All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of Adiscon GmbH or Rainer Gerhards nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

## Function Documentation

void sbSessAbort | ( | sbSessObj * | pThis | ) |

| Close a session without any further communication. Can be used to abort a connection if the remote peer broke it we have a protocol error and we need to break it This method is void, because it *must* complete, no matter which errors it encounters. Furthermore, it is primarily intended to be called from destructors which are also void. Consider it to be an extended desctrutor.

srRetVal sbSessSendRPY | ( | sbSessObj * | pThis,
|  | char * | pszPayload
| ) |

  | Send an reply to the remote peer. Obviously, it is all channel zero stuff. Parameters:
  pszPayload | Message payload.