NSCpp 2.0
NSCpp is a modern C++20 server/client framework designed to simplify network programming in C++. With robust support for both IPv4 and IPv6, as well as TCP and UDP communication protocols.
 
Loading...
Searching...
No Matches
Channel.h File Reference

Project NSCpp. More...

#include <NSC.h>
#include "ClientPP.h"
#include <queue>
#include <shared_mutex>

Go to the source code of this file.

Classes

class  Channel
 

Enumerations

enum class  ChannelState { Active , Inactive }
 Channel's state, tells if the channel can receive data. More...
 
enum class  ChannelType { SLEEPING = 0 , DATA = 1 << 0 , METADATA = 1 << 1 , GLOBAL = 1 << 2 }
 Can be used with | operator to combine them. More...
 

Functions

ChannelType operator| (ChannelType a, ChannelType b)
 Used to combine types.
 
bool hasType (ChannelType channelType, ChannelType flag)
 Let you verify if a Channel have a given type easily.
 

Detailed Description

Project NSCpp.

Author
Thomas K/BIDI
Version
2.0

Enumeration Type Documentation

◆ ChannelState

enum class ChannelState
strong

Channel's state, tells if the channel can receive data.

Enumerator
Active 
Inactive 

◆ ChannelType

enum class ChannelType
strong

Can be used with | operator to combine them.

Enumerator
SLEEPING 

Sleeping Channel (can't receive any message)

DATA 

Receive the message send by a client.

METADATA 

Receive METADATA on the communication (Conn., Disconn.)

GLOBAL 

Bypass the key system and get every message send to the server.

Function Documentation

◆ hasType()

bool hasType ( ChannelType channelType,
ChannelType flag )
inline

Let you verify if a Channel have a given type easily.

◆ operator|()

ChannelType operator| ( ChannelType a,
ChannelType b )
inline

Used to combine types.