Skip to content
Browse files

minor

  • Loading branch information...
1 parent 8af1ae0 commit 24213b0dc541f2a30fc06e422366a35aa3cfbeaf @nniclausse nniclausse committed Sep 7, 2012
Showing with 10 additions and 7 deletions.
  1. +2 −2 src/tsung/ts_ssl.erl
  2. +1 −0 src/tsung/ts_ssl6.erl
  3. +3 −2 src/tsung/ts_tcp.erl
  4. +1 −1 src/tsung/ts_tcp6.erl
  5. +1 −0 src/tsung/ts_udp.erl
  6. +2 −2 src/tsung/ts_udp6.erl
View
4 src/tsung/ts_ssl.erl
@@ -24,17 +24,17 @@ 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).
% set_opts/2 -> 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,17 +45,18 @@ 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).
% set_opts/2 -> 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,14 +44,14 @@ 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) ->
inet:setopts(Socket, Opts),
Socket.
normalize_incomming_data(Socket, Data) ->
- gen_udp:normalize_incomming_data(Socket,Data).
+ ts_udp:normalize_incomming_data(Socket,Data).

0 comments on commit 24213b0

Please sign in to comment.
Something went wrong with that request. Please try again.