Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
bd2c90d3
Commit
bd2c90d3
authored
Nov 2, 2020
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
added log when the listener is registered
parent
304ff9a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/client.go
+3
-0
3 additions, 0 deletions
api/client.go
bindings/client.go
+2
-0
2 additions, 0 deletions
bindings/client.go
with
5 additions
and
0 deletions
api/client.go
+
3
−
0
View file @
bd2c90d3
...
...
@@ -59,6 +59,7 @@ type Client struct {
// merely creates a new cryptographic identity for adding such information
// at a later date.
func
NewClient
(
ndfJSON
,
storageDir
string
,
password
[]
byte
,
registrationCode
string
)
error
{
jww
.
INFO
.
Printf
(
"NewClient()"
)
// Use fastRNG for RNG ops (AES fortuna based RNG using system RNG)
rngStreamGen
:=
fastRNG
.
NewStreamGenerator
(
12
,
3
,
csprng
.
NewSystemRNG
)
rngStream
:=
rngStreamGen
.
GetStream
()
...
...
@@ -103,6 +104,7 @@ func NewClient(ndfJSON, storageDir string, password []byte, registrationCode str
// merely creates a new cryptographic identity for adding such information
// at a later date.
func
NewPrecannedClient
(
precannedID
uint
,
defJSON
,
storageDir
string
,
password
[]
byte
)
error
{
jww
.
INFO
.
Printf
(
"NewPrecannedClient()"
)
// Use fastRNG for RNG ops (AES fortuna based RNG using system RNG)
rngStreamGen
:=
fastRNG
.
NewStreamGenerator
(
12
,
3
,
csprng
.
NewSystemRNG
)
rngStream
:=
rngStreamGen
.
GetStream
()
...
...
@@ -141,6 +143,7 @@ func NewPrecannedClient(precannedID uint, defJSON, storageDir string, password [
// Login initalizes a client object from existing storage.
func
Login
(
storageDir
string
,
password
[]
byte
)
(
*
Client
,
error
)
{
jww
.
INFO
.
Printf
(
"Login()"
)
// Use fastRNG for RNG ops (AES fortuna based RNG using system RNG)
rngStreamGen
:=
fastRNG
.
NewStreamGenerator
(
12
,
3
,
csprng
.
NewSystemRNG
)
...
...
This diff is collapsed.
Click to expand it.
bindings/client.go
+
2
−
0
View file @
bd2c90d3
...
...
@@ -228,6 +228,8 @@ func (c *Client) RegisterNetworkHealthCB(nhc NetworkHealthCallback) {
// Make sure to not conflict with ANY default message types
func
(
c
*
Client
)
RegisterListener
(
uid
[]
byte
,
msgType
int
,
listener
Listener
)
(
*
Unregister
,
error
)
{
jww
.
INFO
.
Printf
(
"RegisterListener(%v, %d)"
,
uid
,
msgType
)
name
:=
listener
.
Name
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment