package
0.0.117
Repository: https://github.com/chenjie199234/corelib.git
Documentation: pkg.go.dev

# Functions

No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
This is a notice func after two peers disconnect with each other Peer is a cancel context,it will be canceled after this function return You can control the timeout by yourself through context.WithTimeout(p,time.Second) After this notice the peer is unknown,dont't use it anymore.
This is a notice func after verify each other success success = true means online success success = false means online failed,connection will be closed.
This is a notice func about which peer is alive Peer is a cancel context,it will be canceled when the connection closed You can control the timeout by yourself through context.WithTimeout(p,time.Second).
This is a func to deal the user message Peer is a cancel context,it will be canceled when the connection closed You can control the timeout by yourself through context.WithTimeout(p,time.Second) Warning!!!Don't reuse the data in 'userdata',it will change when this function return,if you want to use it,copy it first.
HandleVerifyFunc has a timeout context,timeout depend on the ConnectTimeout in config Before two peers can communicate,they need to verify each other first server's response will write back to the client for client to verify the server client's response is useless and it will be dropped,you can just return nil if uniqueid is empty,the peer's RemoteAddr(ip:port) will be used as the uniqueid Warning!!!Don't reuse the data in 'peerVerifyData',it will change when this function return,if you want to use it,copy it first.