Skip to content

Commit

Permalink
Single thread (#339)
Browse files Browse the repository at this point in the history
* single thread

Based on 010fcbc

from @ccaughie

* single thread: st_client.c. remove unused variables

* Revert "single thread: st_client.c. remove unused variables"

This reverts commit 1e240a9.

* single thread: st_client.c. remove unused variable

* single thread: s/usrsctp_fire_timer/usrsctp_handle_timers

* single thread: remove duplicated functions

* single thread: remove duplicate check for SCTP_SO_IS_NBIO(so)

* single thread: s/handle_packets/handle_events

* .gitignore: ignore programs/st_client binary

* user_socket.c: remove unnecessary SB_UPCALL check

* programs/client.c: make main() return(-1) after perror()

* programs/st_client.c: trying to make it work (it does not yet)

* programs/st_client.c: replace CLOCKS_PER_SEC with gettimeofday based code

* programs/client.c: revert cosmetic changes

* programs/st_client.c: clean debug prints

* programs/meson.build: add st_client

* Fix warnings in Windows

* programs/st_client.c: use snd 0 instead of 1.

* programs/st_client.c: add usrsctp_setsockopt(s, IPPROTO_SCTP, SCTP_RECVRCVINFO, &on, sizeof(int))
  • Loading branch information
jmillan authored and tuexen committed Aug 12, 2019
1 parent 3437437 commit f6aa4b0
Show file tree
Hide file tree
Showing 14 changed files with 434 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ programs/ekr_server
programs/http_client
programs/http_client_upcall
programs/rtcweb
programs/st_client
programs/tsctp
programs/test_libmgmt
programs/test_timer
Expand Down
1 change: 1 addition & 0 deletions programs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ list(APPEND check_programs
http_client.c
http_client_upcall.c
rtcweb.c
st_client.c
test_libmgmt.c
test_timer.c
tsctp.c
Expand Down
8 changes: 6 additions & 2 deletions programs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ EXTRA_DIST = \
ekr_peer.c \
test_libmgmt.c \
http_client.c \
http_client_upcall.c
http_client_upcall.c \
st_client.c

noinst_PROGRAMS = \
test_libmgmt \
Expand All @@ -76,7 +77,8 @@ noinst_PROGRAMS = \
ekr_peer \
test_libmgmt \
http_client \
http_client_upcall
http_client_upcall \
st_client

test_libmgmt_SOURCES = programs_helper.c test_libmgmt.c
test_libmgmt_LDADD = ../usrsctplib/libusrsctp.la
Expand Down Expand Up @@ -120,3 +122,5 @@ http_client_SOURCES = programs_helper.c http_client.c
http_client_LDADD = ../usrsctplib/libusrsctp.la
http_client_upcall_SOURCES = programs_helper.c http_client_upcall.c
http_client_upcall_LDADD = ../usrsctplib/libusrsctp.la
st_client_SOURCES = programs_helper.c st_client.c
st_client_LDADD = ../usrsctplib/libusrsctp.la
9 changes: 8 additions & 1 deletion programs/Makefile.nmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ all: \
ekr_loop_upcall \
test_libmgmt \
http_client \
http_client_upcall
http_client_upcall \
st_client

programs_helper.obj : programs_helper.c programs_helper.h
cl $(CVARSDLL) $(CFLAGS) -c programs_helper.c
Expand Down Expand Up @@ -138,6 +139,10 @@ http_client_upcall:
$(CC) $(CFLAGS) $(CVARSDLL) -c http_client_upcall.c
link -out:http_client_upcall.exe http_client_upcall.obj programs_helper.obj $(LINKFLAGS)

st_client:
$(CC) $(CFLAGS) $(CVARSDLL) -c st_client.c
link -out:st_client.exe st_client.obj programs_helper.obj $(LINKFLAGS)

clean:
del /F client.exe
del /F client.obj
Expand Down Expand Up @@ -177,3 +182,5 @@ clean:
del /F http_client.obj
del /F http_client_upcall.exe
del /F http_client_upcall.obj
del /F st_client.exe
del /F st_client.obj
1 change: 1 addition & 0 deletions programs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ programs_helper_sources = files('programs_helper.c')
programs = {
'chargen_server_upcall': files('chargen_server_upcall.c'),
'client': files('client.c'),
'st_client': files('st_client.c'),
'client_upcall': files('client_upcall.c'),
'daytime_server': files('daytime_server.c'),
'daytime_server_upcall': files('daytime_server_upcall.c'),
Expand Down
Loading

0 comments on commit f6aa4b0

Please sign in to comment.