Carrier services
- By ved5
- Smartphones
- 0 Replies
What is carrier services app and does it can improve my network?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
//java client
OutputStream output = client.getOutputStream();
DataOutputStream out = new DataOutputStream(new BufferedOutputStream(output));
byte[] msg;
if(strings[1].equals("swipe"))
{
out.write(strings[1].getBytes());
out.flush();
//strings[0] contains the movement information in format of:
//xmovement_ymovement
//for example: 2.5365_8.5478
msg = strings[0].getBytes();
out.write(msg);
out.flush();
}
#python server
#the 1024 is a temporary number I just put in there
#because I don't know how to find the size of the data in the java client side
request_byte = client_socket.recv(1024)
print("reqeust_byte size: " + str(sys.getsizeof(request_byte)))
request = request_byte.decode()
print("Received " + request)
if request == "swipe":
movement_byte = client_socket.recv(1024)
print("movement_byte size: " + str(sys.getsizeof(movement_byte)))
movement_str = movement_byte.decode()
x_movement, y_movement = movement_str.split("_")
print("x: " + x_movement)
print("y: " + y_movement)
swipe(float(x_movement), float(y_movement))
