Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor

  • Loading branch information...
commit 24213b0dc541f2a30fc06e422366a35aa3cfbeaf 1 parent 8af1ae0
@nniclausse nniclausse authored
View
4 src/tsung/ts_ssl.erl
@@ -24,9 +24,10 @@ connect(Socket, Opts)->
opts_to_tcp_opts(Opts) -> Opts.
%% send/3 -> ok | {error, Reason}
-send(Socket, Data, _Opts) ->
+send(Socket, Data, _Opts) ->
ssl:send(Socket, Data).
+close(none) -> ok;
close(Socket) ->
ssl:close(Socket).
@@ -34,7 +35,6 @@ close(Socket) ->
set_opts(Socket, Opts) ->
ssl:setopts(Socket, Opts),
Socket.
-
normalize_incomming_data(Socket, {ssl, Socket, Data}) ->
{gen_ts_transport, Socket, Data};
View
1  src/tsung/ts_ssl6.erl
@@ -47,6 +47,7 @@ connect(Socket, Opts)->
send(Socket, Data, _Opts) ->
ssl:send(Socket, Data).
+close(none) -> ok;
close(Socket) ->
ssl:close(Socket).
View
5 src/tsung/ts_tcp.erl
@@ -45,9 +45,10 @@ connect(Host, Port, Opts) ->
opts_to_tcp_opts(Opts) -> Opts.
%% send/3 -> ok | {error, Reason}
-send(Socket, Data, _Opts) ->
+send(Socket, Data, _Opts) ->
gen_tcp:send(Socket, Data).
+close(none) -> ok;
close(Socket) ->
gen_tcp:close(Socket).
@@ -55,7 +56,7 @@ close(Socket) ->
set_opts(Socket, Opts) ->
inet:setopts(Socket, Opts),
Socket.
-
+
normalize_incomming_data(Socket, {tcp, Socket, Data}) ->
{gen_ts_transport, Socket, Data};
View
2  src/tsung/ts_tcp6.erl
@@ -43,7 +43,7 @@ send(Socket, Data, _Opts) ->
gen_tcp:send(Socket, Data).
close(Socket) ->
- gen_tcp:close(Socket).
+ ts_tcp:close(Socket).
% set_opts/2 -> socket()
set_opts(Socket, Opts) ->
View
1  src/tsung/ts_udp.erl
@@ -47,6 +47,7 @@ connect(_Host, _Port, Opts) ->
send(Socket, Data, [{host, Host}, {port, Port}]) ->
gen_udp:send(Socket, Host,Port, Data).
+close(none) -> ok;
close(Socket) ->
gen_udp:close(Socket).
View
4 src/tsung/ts_udp6.erl
@@ -44,7 +44,7 @@ send(Socket, Data, Opts) ->
ts_udp:send(Socket, Data, Opts).
close(Socket) ->
- gen_udp:close(Socket).
+ ts_udp:close(Socket).
% set_opts/2 -> socket()
set_opts(Socket, Opts) ->
@@ -52,6 +52,6 @@ set_opts(Socket, Opts) ->
Socket.
normalize_incomming_data(Socket, Data) ->
- gen_udp:normalize_incomming_data(Socket,Data).
+ ts_udp:normalize_incomming_data(Socket,Data).
Please sign in to comment.
Something went wrong with that request. Please try again.