本文整理匯總了Golang中github.com/quickfixgo/quickfix.SessionID.String方法的典型用法代碼示例。如果您正苦於以下問題:Golang SessionID.String方法的具體用法?Golang SessionID.String怎麽用?Golang SessionID.String使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/quickfixgo/quickfix.SessionID
的用法示例。
在下文中一共展示了SessionID.String方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: processMsg
func (e *EchoApplication) processMsg(msg *quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
var possResend field.PossResendField
msg.Header.Get(&possResend)
if msg.Body.Has(tag.ClOrdID) {
var orderID field.ClOrdIDField
if err := msg.Body.Get(&orderID); err != nil {
return err
}
sessionOrderID := sessionID.String() + orderID.String()
if possResend.FIXBoolean {
if e.OrderIds[sessionOrderID] {
return nil
}
}
e.OrderIds[sessionOrderID] = true
}
reply := copyMessage(msg)
if possResend.FIXBoolean {
reply.Header.Set(possResend)
}
quickfix.SendToTarget(reply, sessionID)
return nil
}
示例2: OnLogout
func (e *EchoApplication) OnLogout(sessionID quickfix.SessionID) {
e.log.Printf("OnLogout %v\n", sessionID.String())
}
示例3: OnLogon
func (e *EchoApplication) OnLogon(sessionID quickfix.SessionID) {
e.log.Printf("OnLogon %v\n", sessionID.String())
e.OrderIds = make(map[string]bool)
}
示例4: OnCreate
func (e EchoApplication) OnCreate(sessionID quickfix.SessionID) {
e.log.Printf("OnCreate %v\n", sessionID.String())
}
示例5: OnLogout
func (e *FixAcceptor) OnLogout(sessionID quickfix.SessionID) {
e.log.Printf("OnLogout %v\n", sessionID.String())
}
示例6: OnLogon
func (e *FixAcceptor) OnLogon(sessionID quickfix.SessionID) {
e.log.Printf("OnLogon %v\n", sessionID.String())
fmt.Println("logged on!")
e.OrderIds = make(map[string]bool)
}
示例7: OnCreate
func (e FixAcceptor) OnCreate(sessionID quickfix.SessionID) {
e.log.Printf("OnCreate %v\n", sessionID.String())
}