Skip to content

Instantly share code, notes, and snippets.

@Idorobots
Created July 31, 2013 09:24
Show Gist options
  • Save Idorobots/6120670 to your computer and use it in GitHub Desktop.
Save Idorobots/6120670 to your computer and use it in GitHub Desktop.
Tsung Socket.IO config
<session probability="50" name="websocket" type="ts_websocket">
<transaction name="socketio_ws_handshake">
<request>
<dyn_variable name="sid" re="\r\n\r\n([^:]+):[^:]+:[^:]+:[^:]+"/>
<http url="/socket.io/1/" method="GET" version="1.1">
<http_header name="origin" value="null"/>
</http>
</request>
<request subst="true">
<websocket type="connect" origin="null" url="/socket.io/1/websocket/%%_sid%%/"/>
</request>
</transaction>
<for var="i" from="1" to="10" incr="1">
<thinktime value="10"/>
<request>
<websocket type="ping">PING</websocket>
</request>
</for>
<request>
<websocket type="close"/>
</request>
</session>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment