I need to create a client-server example over TCP. In the client side I read 2 numbers and I send them to the server. The problem I faced is that I can't convert from []byte
to int
, because the communication accept only data of type []byte
.
Is there any way to convert []byte
to int
or I can send int
to the server?
Some sample code will be really appreciated.
Thanks.