Debian Codegraph @

control/cmd_stream.go

raw symbols SCIP
1 package controlscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/
2
3 import (
4 "strconvscip-go gomod github.com/golang/go/src go1.15 strconv/"
5 )
6
7 // AttachStream invokes ATTACHSTREAM.
8 func (c *Connscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#) AttachStreamscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#AttachStream().(streamID string, circuitID string, hopNum int) error {
9 if circuitID == "" {
10 circuitID = "0"
11 }
12 cmd := "ATTACHSTREAM " + streamID + " " + circuitID
13 if hopNum > 0 {
14 cmd += " HOP=" + strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.Itoascip-go gomod github.com/golang/go/src go1.15 strconv/Itoa().(hopNum)
15 }
16 return c.sendRequestIgnoreResponsescip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#sendRequestIgnoreResponse().(cmd)
17 }
18
19 // RedirectStream invokes REDIRECTSTREAM.
20 func (c *Connscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#) RedirectStreamscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#RedirectStream().(streamID string, address string, port int) error {
21 cmd := "REDIRECTSTREAM " + streamID + " " + address
22 if port > 0 {
23 cmd += " " + strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.Itoascip-go gomod github.com/golang/go/src go1.15 strconv/Itoa().(port)
24 }
25 return c.sendRequestIgnoreResponsescip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#sendRequestIgnoreResponse().(cmd)
26 }
27
28 // CloseStream invokes CLOSESTREAM.
29 func (c *Connscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#) CloseStreamscip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#CloseStream().(streamID string, reason string) error {
30 return c.sendRequestIgnoreResponsescip-go gomod github.com/cretz/bine . `github.com/cretz/bine/control`/Conn#sendRequestIgnoreResponse().("CLOSESTREAM %v %v", streamID, reason)
31 }