How to make a server being server and client simultaneously

49 views
Skip to first unread message

GopherNewbie

unread,
Jan 15, 2020, 2:59:06 AM1/15/20
to golang-nuts
Hello Gophers,

I programmed a server (A) that listens on 2 different ports, but I would like to change one of the ports to be sending the client's received requests to another server (B) so that when the server (B) replies the server (A) sends the answer to that specific client.

I got some issues with goroutines and channels

note: 
- We can have more than one client ( each client should only get what they sent )
- The comments in the codes show how I was thinking to do it.

Please help...

Amnon Baron Cohen

unread,
Jan 15, 2020, 3:11:47 AM1/15/20
to golang-nuts
Is this homework?

GopherNewbie

unread,
Jan 15, 2020, 3:50:36 AM1/15/20
to golang-nuts
An exercise I am trying to do.
Reply all
Reply to author
Forward
0 new messages