1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-19 22:58:06 +00:00

require improvements, remove global Util

This commit is contained in:
kepler155c@gmail.com
2017-09-05 02:09:31 -04:00
parent 2b1d96ab37
commit ae7508e89b
82 changed files with 506 additions and 455 deletions

View File

@@ -1,5 +1,7 @@
local Logger = require('logger')
local Crypto = require('crypto')
local Crypto = require('crypto')
local Logger = require('logger')
local Security = require('security')
local Util = require('util')
local socketClass = { }
@@ -110,7 +112,7 @@ function Socket.connect(host, port)
type = 'OPEN',
shost = socket.shost,
dhost = socket.dhost,
t = Crypto.encrypt({ ts = os.time(), seq = socket.seq }, os.getPublicKey()),
t = Crypto.encrypt({ ts = os.time(), seq = socket.seq }, Security.getPublicKey()),
rseq = socket.wseq,
wseq = socket.rseq,
})