mirror of
https://github.com/esiur/esiur-dart.git
synced 2025-05-06 12:02:57 +00:00
DateTime Fix
This commit is contained in:
parent
4cdeedb091
commit
05518b33d7
@ -485,7 +485,7 @@ class DC with IterableMixin<int> {
|
|||||||
//var h = this.getUint32(offset + 4);
|
//var h = this.getUint32(offset + 4);
|
||||||
//return h * TWO_PWR_32 + ((l >= 0) ? l : TWO_PWR_32 + l);
|
//return h * TWO_PWR_32 + ((l >= 0) ? l : TWO_PWR_32 + l);
|
||||||
} else {
|
} else {
|
||||||
return _dv.getUint64(offset);
|
return _dv.getUint64(offset, endian);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,7 +523,7 @@ class DC with IterableMixin<int> {
|
|||||||
//var h = this.getUint32(offset + 4);
|
//var h = this.getUint32(offset + 4);
|
||||||
//return h * TWO_PWR_32 + ((l >= 0) ? l : TWO_PWR_32 + l);
|
//return h * TWO_PWR_32 + ((l >= 0) ? l : TWO_PWR_32 + l);
|
||||||
} else {
|
} else {
|
||||||
return _dv.getUint64(offset);
|
return _dv.getUint64(offset, endian);
|
||||||
}
|
}
|
||||||
// if (kIsWeb) {
|
// if (kIsWeb) {
|
||||||
// print("getUint64");
|
// print("getUint64");
|
||||||
|
@ -224,6 +224,18 @@ class DistributedConnection extends NetworkConnection with IStore {
|
|||||||
var secure = instance?.attributes.containsKey("secure") == true ||
|
var secure = instance?.attributes.containsKey("secure") == true ||
|
||||||
instance?.attributes.containsKey("wss") == true;
|
instance?.attributes.containsKey("wss") == true;
|
||||||
|
|
||||||
|
if (instance?.attributes.containsKey("autoReconnect") ?? false)
|
||||||
|
autoReconnect = instance?.attributes["autoReconnect"] == true;
|
||||||
|
|
||||||
|
if (instance?.attributes.containsKey("reconnectInterval") ?? false)
|
||||||
|
reconnectInterval = instance?.attributes["reconnectInterval"];
|
||||||
|
|
||||||
|
if (instance?.attributes.containsKey("keepAliveInterval") ?? false)
|
||||||
|
keepAliveInterval = instance?.attributes["keepAliveInterval"];
|
||||||
|
|
||||||
|
if (instance?.attributes.containsKey("keepAliveTime") ?? false)
|
||||||
|
keepAliveTime = instance?.attributes["keepAliveTime"];
|
||||||
|
|
||||||
if (instance?.attributes.containsKey("username") == true &&
|
if (instance?.attributes.containsKey("username") == true &&
|
||||||
instance?.attributes.containsKey("password") == true) {
|
instance?.attributes.containsKey("password") == true) {
|
||||||
var username = instance?.attributes["username"] as String;
|
var username = instance?.attributes["username"] as String;
|
||||||
@ -594,7 +606,7 @@ class DistributedConnection extends NetworkConnection with IStore {
|
|||||||
|
|
||||||
Timer? _keepAliveTimer;
|
Timer? _keepAliveTimer;
|
||||||
|
|
||||||
int KeepAliveInterval = 30;
|
int keepAliveInterval = 30;
|
||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
_queue.then((x) {
|
_queue.then((x) {
|
||||||
@ -636,7 +648,7 @@ class DistributedConnection extends NetworkConnection with IStore {
|
|||||||
jitter = x?[1];
|
jitter = x?[1];
|
||||||
|
|
||||||
_keepAliveTimer =
|
_keepAliveTimer =
|
||||||
Timer(Duration(seconds: KeepAliveInterval), _keepAliveTimerElapsed);
|
Timer(Duration(seconds: keepAliveInterval), _keepAliveTimerElapsed);
|
||||||
|
|
||||||
//print("Keep Alive Received ${jitter}");
|
//print("Keep Alive Received ${jitter}");
|
||||||
|
|
||||||
@ -1142,7 +1154,7 @@ class DistributedConnection extends NetworkConnection with IStore {
|
|||||||
|
|
||||||
// start perodic keep alive timer
|
// start perodic keep alive timer
|
||||||
_keepAliveTimer = Timer(
|
_keepAliveTimer = Timer(
|
||||||
Duration(seconds: KeepAliveInterval), _keepAliveTimerElapsed);
|
Duration(seconds: keepAliveInterval), _keepAliveTimerElapsed);
|
||||||
}
|
}
|
||||||
} else if (_authPacket.command == IIPAuthPacketCommand.Error) {
|
} else if (_authPacket.command == IIPAuthPacketCommand.Error) {
|
||||||
_invalidCredentials = true;
|
_invalidCredentials = true;
|
||||||
|
@ -83,7 +83,7 @@ class TemplateGenerator {
|
|||||||
template.properties.forEach((p) {
|
template.properties.forEach((p) {
|
||||||
if (p.inherited) return;
|
if (p.inherited) return;
|
||||||
var ptTypeName = getTypeName(template, p.valueType, templates);
|
var ptTypeName = getTypeName(template, p.valueType, templates);
|
||||||
rt.writeln("${ptTypeName}? ${p.name};");
|
rt.writeln("${ptTypeName} ${p.name};");
|
||||||
rt.writeln();
|
rt.writeln();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ class TemplateGenerator {
|
|||||||
}).join("\r\n");
|
}).join("\r\n");
|
||||||
|
|
||||||
var typesFile = makeImports(null) +
|
var typesFile = makeImports(null) +
|
||||||
"\r\n void init_${dir}(){ ${defineCreators} \r\n ${putTemplates}}";
|
"\r\n void init_${dir?.replaceAll('.', '_')}(){ ${defineCreators} \r\n ${putTemplates}}";
|
||||||
|
|
||||||
var f = File("${dstDir.path}/init.g.dart");
|
var f = File("${dstDir.path}/init.g.dart");
|
||||||
f.writeAsStringSync(typesFile);
|
f.writeAsStringSync(typesFile);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: esiur
|
name: esiur
|
||||||
description: Distributed Object Framework.
|
description: Distributed Object Framework.
|
||||||
version: 2.0.7
|
version: 2.0.9
|
||||||
#author: Ahmed Zamil <ahmed@esiur.com>
|
#author: Ahmed Zamil <ahmed@esiur.com>
|
||||||
homepage: https://github.com/esiur/esiur-dart
|
homepage: https://github.com/esiur/esiur-dart
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user