Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pipe ¶
func (*Pipe) RunChannel ¶
|--------| |--------| |--------| |--------| \ \ ----> \ \ ----a---> \ \ ----> \ \ Target | target | io.Copy | left | channels | right | io.Copy | client | Listen Port \ \ <---- \ \ \ \ <----- \ \ Port |--------| |--------| <---b----- |--------| |--------|
RunDevelop represents a pipe with an intermediate communication over channels which, if it works, proves that we can relay because our websocket clients have a channel-based interface (TODO consider if that should stay the case?)
func (*Pipe) RunDevelop ¶
func (*Pipe) RunWS ¶
using freeport |--------| |--------| |--------| |--------| \ \ ----> \ \ \ \ ----> \ \ Target | target | io.Copy | host | websocket | client | io.Copy | client | Listen Port \ \ <---- \ \ <---> \ \ <----- \ \ Port |--------| |--------| |--------| |--------|
This works with simultaneous connections, even streaming large binary files at the same time
func (*Pipe) RunWSChan ¶
using freeport0 using freeport1 wsPort0 wsURL0 wsPort1 wsURL1 |--------| |--------| |--------| |--------| |--------| |--------| \ tcp \ ----> \ ws \ \ ws \ ----a---> \ ws \ \ ws \ ----> \ tcp \ Target | target | io.Copy | host | websocket | client | channels | host | websocket | client | io.Copy | client | Listen Port \ \ <---- \ \ <---> \ \ \ \ <---> \ \ <----- \ \ Port |--------| |--------| |--------| <---b----- |--------| |--------| |--------| Part |<---------- A ------------------>|<------B--------------->|<--------C----------->|<------------------D---------------->|
This can also relay large binary files without error, so the websocket to channel implementation here is ok This is different to approach taken in the existing shellbar hub, so that needs testing/revising
Click to show internal directories.
Click to hide internal directories.