This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
var server = net.createServer(function (socket) { | |
socket.write('Echo server\r\n'); | |
socket.pipe(socket); | |
}); | |
server.listen(8888, '0.0.0.0'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
A simple echo server | |
""" | |
import socket | |
host = '' | |
port = 8888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX=`pwd`/protobuf/android | |
rm -rf ${PREFIX} | |
mkdir ${PREFIX} | |
export NDK=YOUR_NDK_ROOT | |
# 1. Use the tools from the Standalone Toolchain | |
export PATH=YOUR_NDK_STAND_ALONE_TOOL_PATH/bin:$PATH | |
export SYSROOT=YOUR_NDK_STAND_ALONE_TOOL_PATH/sysroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Building Google Protobuf for Mac OS X / iOS. | |
echo Use 'tail -f build.log' to monitor progress. | |
( | |
PREFIX=`pwd`/protobuf/ios | |
rm -rf ${PREFIX} | |
mkdir ${PREFIX} | |
mkdir ${PREFIX}/platform |