android Programming Glossary: endl
TCP socket Transfer data from PC to android device (Android NDK) http://stackoverflow.com/questions/11872405/tcp-socket-transfer-data-from-pc-to-android-device-android-ndk startServer void MyServerThread run std cout hi std endl for int i 0 i 16 i matrix i float i memcpy buf matrix 4 16 sendMSG.. SOCK_STREAM 0 1 std cerr socket creation failed std endl exit 1 Initail bind to port now fill in values of the server.. sizeof struct sockaddr 1 std cerr socket bind failed std endl exit 1 int queueSize 1 Start listening wait for connection from..
TCP socket Transfer data from PC to android device (Android NDK) http://stackoverflow.com/questions/11872405/tcp-socket-transfer-data-from-pc-to-android-device-android-ndk form client to server... server side MyServerThread MyServerThread startServer void MyServerThread run std cout hi std endl for int i 0 i 16 i matrix i float i memcpy buf matrix 4 16 sendMSG TCP socket now create the server socket make it an IPV4.. and 0 to select default protocol type if server_skt socket AF_INET SOCK_STREAM 0 1 std cerr socket creation failed std endl exit 1 Initail bind to port now fill in values of the server sockaddr_in struct s_addr and sin_port are in Network Byte.. server_addr if bind server_skt struct sockaddr server_addr sizeof struct sockaddr 1 std cerr socket bind failed std endl exit 1 int queueSize 1 Start listening wait for connection from client with a pending queue of size if listen server_skt..
|