Documentation ¶
Index ¶
- type ConnectionManager
- type ConnectionManagerImpl
- func (comm *ConnectionManagerImpl) Close(connectionID string)
- func (comm *ConnectionManagerImpl) CreateStreamClientConn(connectionID string, ip string) error
- func (comm *ConnectionManagerImpl) SendStream(message *pb.StreamMessage, successCallBack OnSuccess, errorCallBack OnError, ...)
- func (comm *ConnectionManagerImpl) SetOnConnectHandler(onConnectionHandler OnConnectionHandler)
- func (comm *ConnectionManagerImpl) Size() int
- func (comm *ConnectionManagerImpl) Stop()
- func (comm *ConnectionManagerImpl) Stream(stream pb.StreamService_StreamServer) error
- func (comm *ConnectionManagerImpl) Subscribe(name string, subfunc func(message msg.OutterMessage))
- type OnConnectionHandler
- type OnError
- type OnSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶
type ConnectionManager interface { SendStream(data *pb.StreamMessage, successCallBack OnSuccess, errorCallBack OnError, connectionID string) Stop() Close(connectionID string) CreateStreamClientConn(connectionID string, ip string) error Size() int //Server on function Stream(stream pb.StreamService_StreamServer) error SetOnConnectHandler(onConnectionHandler OnConnectionHandler) Subscribe(name string, subfunc func(message msg.OutterMessage)) }
comm은 peer 들간의 connection을 유지하고있다. comm을 통해 peer들과 통신한다.
func NewConnectionManagerImpl ¶
func NewConnectionManagerImpl(crpyto auth.Crypto) ConnectionManager
type ConnectionManagerImpl ¶
Connection관리와 message-> Envelop검사를 수행한다.
func (*ConnectionManagerImpl) Close ¶
func (comm *ConnectionManagerImpl) Close(connectionID string)
func (*ConnectionManagerImpl) CreateStreamClientConn ¶
func (comm *ConnectionManagerImpl) CreateStreamClientConn(connectionID string, ip string) error
func (*ConnectionManagerImpl) SendStream ¶
func (comm *ConnectionManagerImpl) SendStream(message *pb.StreamMessage, successCallBack OnSuccess, errorCallBack OnError, connectionID string)
todo close 어떻게 할지
func (*ConnectionManagerImpl) SetOnConnectHandler ¶
func (comm *ConnectionManagerImpl) SetOnConnectHandler(onConnectionHandler OnConnectionHandler)
func (*ConnectionManagerImpl) Size ¶
func (comm *ConnectionManagerImpl) Size() int
func (*ConnectionManagerImpl) Stop ¶
func (comm *ConnectionManagerImpl) Stop()
func (*ConnectionManagerImpl) Stream ¶
func (comm *ConnectionManagerImpl) Stream(stream pb.StreamService_StreamServer) error
func (*ConnectionManagerImpl) Subscribe ¶
func (comm *ConnectionManagerImpl) Subscribe(name string, subfunc func(message msg.OutterMessage))
type OnConnectionHandler ¶
type OnConnectionHandler func(conn conn.Connection, peer pb.Peer)
Click to show internal directories.
Click to hide internal directories.