(input io.Reader, output io.Writer, serverImpl ServerImpl, debugStr string)
| 135 | } |
| 136 | |
| 137 | func SetupPacketRpcClient(input io.Reader, output io.Writer, serverImpl ServerImpl, debugStr string) (*WshRpc, chan []byte) { |
| 138 | messageCh := make(chan baseds.RpcInputChType, DefaultInputChSize) |
| 139 | outputCh := make(chan []byte, DefaultOutputChSize) |
| 140 | rawCh := make(chan []byte, DefaultOutputChSize) |
| 141 | rpcClient := MakeWshRpcWithChannels(messageCh, outputCh, wshrpc.RpcContext{}, serverImpl, debugStr) |
| 142 | go packetparser.Parse(input, messageCh, rawCh) |
| 143 | go func() { |
| 144 | defer func() { |
| 145 | panichandler.PanicHandler("SetupPacketRpcClient:outputloop", recover()) |
| 146 | }() |
| 147 | for msg := range outputCh { |
| 148 | packetparser.WritePacket(output, msg) |
| 149 | } |
| 150 | }() |
| 151 | return rpcClient, rawCh |
| 152 | } |
| 153 | |
| 154 | func SetupConnRpcClient(conn net.Conn, serverImpl ServerImpl, debugStr string) (*WshRpc, chan error, error) { |
| 155 | inputCh := make(chan baseds.RpcInputChType, DefaultInputChSize) |
nothing calls this directly
no test coverage detected