I want so send protobuffer to a server which do something with the protobuffer, im developing on android studio.
private OutputStream toServer ;
public void serialize(byte[]message) throws IOException {
try{
toServer= new ObjectOutputStream(new BufferedOutputStream(socket.getOutputStream()));
toServer.write(message);
toServer.write(message,0,message.length);
toServer.flush();
}
catch (java.net.SocketException e){
e.printStackTrace();
}