mirror of
https://github.com/esiur/esiur-dart.git
synced 2026-04-03 17:58:21 +00:00
package
This commit is contained in:
25
lib/src/Net/Sockets/IPEndPoint.dart
Normal file
25
lib/src/Net/Sockets/IPEndPoint.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class IPEndPoint
|
||||
{
|
||||
List<int> ip;
|
||||
int port;
|
||||
|
||||
|
||||
String getIP()
|
||||
{
|
||||
return ip.join(".");
|
||||
//return "${(ip >> 24) & 0xFF}.${(ip >> 16) & 0xFF}.${(ip >> 8) & 0xFF}.${ip & 0xFF}";
|
||||
}
|
||||
|
||||
String get address => getIP();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "${getIP()}:${port}";
|
||||
}
|
||||
|
||||
|
||||
IPEndPoint(this.ip, this.port)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user