source: trunk/packages/vizservers/nanovis/socket/ServerSocket.h @ 3177

Last change on this file since 3177 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/* ======================================================================
3 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
4 *           Purdue Rendering and Perceptualization Lab (PURPL)
5 *
6 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
7 *
8 *  See the file "license.terms" for information on usage and
9 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10 * ======================================================================
11 */
12#ifndef SERVERSOCKET_H
13#define SERVERSOCKET_H
14
15#include "Socket.h"
16
17class ServerSocket : private Socket
18{
19public:
20    ServerSocket(int port);
21    ServerSocket()
22    {}
23    virtual ~ServerSocket();
24
25    const ServerSocket& operator <<(const std::string&) const;
26    const ServerSocket& operator >>(std::string&) const;
27
28    bool send(char* s, int size) const;
29    int recv(char* s, int size) const;
30
31    bool accept(ServerSocket&);
32
33    void set_non_blocking(bool val);
34    bool is_connected();
35    bool set_connected(bool val);
36
37private:
38    bool connected;
39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.