Run starts forwarding the traffic using SCTP.
()
| 65 | |
| 66 | // Run starts forwarding the traffic using SCTP. |
| 67 | func (proxy *SCTPProxy) Run() { |
| 68 | quit := make(chan bool) |
| 69 | defer close(quit) |
| 70 | for { |
| 71 | client, err := proxy.listener.Accept() |
| 72 | if err != nil { |
| 73 | log.Printf("Stopping proxy on sctp/%v for sctp/%v (%s)", proxy.frontendAddr, proxy.backendAddr, err) |
| 74 | return |
| 75 | } |
| 76 | go proxy.clientLoop(client.(*sctp.SCTPConn), quit) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // Close stops forwarding the traffic. |
| 81 | func (proxy *SCTPProxy) Close() { proxy.listener.Close() } |
nothing calls this directly
no test coverage detected