Comments (6)
Note that format needs to he exposed to main API as well
from udp-connect.
struct IPv4Address
{
uint8_t octets[4];
};
struct IPv6Address
{
uint16_t segments[8];
};
from udp-connect.
enum IpVersion : uint8_t
{
IP_V4,
IP_V6,
};
// IP represented in bytes
// IPv4 readable format by byte number is
// [0].[1].[2].[3]
// IPv6 readable format by byte number is
// [0][1]:[2][3]:[4][5]:[6][7]:[8][9]:[10][11]:[12][13]:[14][15]
// NOTE: Byte pairs (e.g. [0][1]) in Big Endian byte order
union IpAddress
{
uint8_t ip_v4[4];
uint8_t ip_v6[16];
};
from udp-connect.
void udcConvertStringToIp(const char* str, IpVersion* version, IpAddress* address);
void udcConvertIpToString(IpVersion version, IpAddress address, char* str);
from udp-connect.
needs to be typedef uint8_t[16] IpAddress
;
because no unions in C
from udp-connect.
enum UdcAddressFamily
{
UDC_IPV4,
UDC_IPV6,
};
struct UdcAddress
{
uint8_t bytes[16];
};
struct UdcAddressIPv4
{
uint8_t bytes[4];
};
struct UdcAddressIPv6
{
uint8_t bytes[16];
};
UdcAddressIPv4 udcConvertToIPv4(UdcAddress);
UdcAddressIPv6 udcConvertToIPv6(UdcAddress);
from udp-connect.
Related Issues (18)
- support connection with IPv6 HOT 1
- bind server to INADDR_ANY not loopback
- Investigate connecting with getaddrinfo()
- Client{} and Server{} implement unreliable UDP messaging
- Allow listening for IPv4, IPv6, or both (if option is available)
- Client{} and Server{} implement Reliable messages with response HOT 3
- Handle disconnecting and reconnecting
- Unique Node ID
- design receive loop interface
- Create C# Wrapper
- read client state and ping from interface
- built-in disconnect event
- Allow binding of N IPv4 ports and M IPv6 ports HOT 1
- require 2way
- provise separate at_least_once udp
- remove debugging from server creation and create event callback for debug messages HOT 4
- add firewall and nat punchthrough readme section
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udp-connect.