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'); | |
console.log(" [.] Connecting to localhost:8000"); | |
var conn = net.createConnection(8000, '127.0.0.1'); | |
var data = [ | |
"GET /echo/1/1/websocket HTTP/1.1", | |
"Upgrade: websocket", | |
"Connection: Upgrade", | |
"Host: localhost", |
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
''' | |
Very simple queue implementation. Don't use it. Use collections.deque | |
instead. | |
>>> q = Queue() | |
>>> q.push(1) | |
>>> q.push(2) | |
>>> len(q) | |
2 | |
>>> bool(q) |
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
diff -r 3be0091c6401 src/rabbit_stomp_client_sup.erl | |
--- a/src/rabbit_stomp_client_sup.erl Wed Feb 08 15:53:59 2012 +0000 | |
+++ b/src/rabbit_stomp_client_sup.erl Wed Feb 22 11:52:02 2012 +0000 | |
@@ -18,7 +18,7 @@ | |
-behaviour(supervisor2). | |
-define(MAX_WAIT, 16#ffffffff). | |
--export([start_link/1, start_processor/3, init/1]). | |
+-export([start_link/1, start_processor/5, init/1]). | |
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
all: | |
rebar get-deps | |
rebar compile | |
erl -pa ebin deps/*/ebin -s wsbug | |
clean: | |
rm -rf deps ebin |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>test</title> | |
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"> | |
{ | |
overrideConsole: true, | |
startInNewWindow: false, |
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 | |
import re | |
import sys | |
if len(sys.argv) > 1: | |
columns = int(sys.argv[1]) | |
else: | |
columns = 100 | |
pattern = re.compile(r'^(\s*\S+) (.*)$') |
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
--- src/proto_http-orig.c 2011-09-10 22:43:11.000000000 +0100 | |
+++ src/proto_http.c 2012-03-07 00:06:10.000000000 +0000 | |
@@ -3560,8 +3560,10 @@ int http_process_request(struct session | |
(((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_addr.s_addr & s->be->except_mask.s_addr) | |
!= s->be->except_net.s_addr)) { | |
int len; | |
+ unsigned int port; | |
unsigned char *pn; | |
pn = (unsigned char *)&((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_addr; | |
+ port = ntohs(((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_port); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta charset="UTF-8" /> | |
<script type="text/javascript" src="lib/sockjs.js"></script> | |
<script type="text/javascript" src="static/jquery.min.js"></script> | |
<script type="text/javascript" src="config.js"></script> |
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
node_modules | |
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
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractClientConnectionFactory.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractClientConnectionFactory.java | |
index 7b4252f..87e462d 100644 | |
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractClientConnectionFactory.java | |
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractClientConnectionFactory.java | |
@@ -57,6 +57,20 @@ public abstract class AbstractClientConnectionFactory extends AbstractConnection | |
} | |
} | |
+ /** | |
+ * Get a dedicated long-lived connection - regardless of single-use |