17 #ifndef _DECAF_NET_SOCKET_H_ 18 #define _DECAF_NET_SOCKET_H_ 55 mutable volatile bool created;
147 Socket(
const std::string& host,
int port );
169 Socket(
const std::string& host,
int port,
const InetAddress* localAddress,
int localPort );
187 virtual void bind(
const std::string& ipaddress,
int port );
195 virtual void close();
208 virtual void connect(
const std::string& host,
int port );
227 virtual void connect(
const std::string& host,
int port,
int timeout );
256 return inputShutdown;
263 return outputShutdown;
308 int getLocalPort()
const;
315 std::string getInetAddress()
const;
322 std::string getLocalAddress()
const;
330 virtual void shutdownInput();
338 virtual void shutdownOutput();
348 virtual int getSoLinger()
const;
362 virtual void setSoLinger(
bool state,
int timeout );
371 virtual bool getKeepAlive()
const;
381 virtual void setKeepAlive(
bool keepAlive );
391 virtual int getReceiveBufferSize()
const;
402 virtual void setReceiveBufferSize(
int size );
411 virtual bool getReuseAddress()
const;
421 virtual void setReuseAddress(
bool reuse );
431 virtual int getSendBufferSize()
const;
443 virtual void setSendBufferSize(
int size );
452 virtual int getSoTimeout()
const;
464 virtual void setSoTimeout(
int timeout );
473 virtual bool getTcpNoDelay()
const;
484 virtual void setTcpNoDelay(
bool value );
497 virtual int getTrafficClass()
const;
512 virtual void setTrafficClass(
int value );
521 virtual bool getOOBInline()
const;
531 virtual void setOOBInline(
bool value );
541 virtual void sendUrgentData(
int data );
546 virtual std::string toString()
const;
570 void initSocketImpl(
const std::string& address,
int port,
const InetAddress* localAddress,
int localPort );
573 void checkClosed()
const;
576 void ensureCreated()
const;
bool isConnected() const
Indicates whether or not this socket is connected to am end point.
Definition: Socket.h:234
bool isOutputShutdown() const
Definition: Socket.h:262
bool isInputShutdown() const
Definition: Socket.h:255
bool isBound() const
Definition: Socket.h:248
bool isClosed() const
Definition: Socket.h:241
Factory class interface for a Factory that creates ScoketImpl objects.
Definition: SocketImplFactory.h:38
Represents an IP address.
Definition: InetAddress.h:33
Interface for a class that implements the close method.
Definition: Closeable.h:30
Acts as a base class for all physical Socket implementations.
Definition: SocketImpl.h:42
SocketImpl * impl
Definition: Socket.h:48
#define DECAF_API
Definition: Config.h:29
This class implements server sockets.
Definition: ServerSocket.h:50
Base interface for any class that wants to represent an output stream of bytes.
Definition: OutputStream.h:39
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25