Skip to content

Commit

Permalink
Modify API to allow single-threaded operation
Browse files Browse the repository at this point in the history
Added usrsctp_init_nothreads to initialize without creating threads
Added usrsctp_fire_timer to fire the SCTP timer from an application thread
Added usrsctp_get_events to get read, write and error events on a socket
Added usrsctp_set_upcall to receive a callback when socket events occur
  • Loading branch information
ccaughie committed Nov 27, 2015
1 parent 727d449 commit 010fcbc
Show file tree
Hide file tree
Showing 13 changed files with 490 additions and 20 deletions.
7 changes: 4 additions & 3 deletions programs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#

AM_CPPFLAGS = -I$(srcdir)/../usrsctplib
EXTRA_DIST = Makefile.nmake tsctp.c daytime_server.c discard_server.c echo_server.c client.c rtcweb.c ekr_client.c ekr_server.c ekr_loop.c
noinst_PROGRAMS = tsctp daytime_server discard_server echo_server client rtcweb ekr_client ekr_server ekr_peer ekr_loop
EXTRA_DIST = Makefile.nmake tsctp.c daytime_server.c discard_server.c echo_server.c client.c rtcweb.c ekr_client.c ekr_server.c ekr_loop.c st_client.c
noinst_PROGRAMS = tsctp daytime_server discard_server echo_server client rtcweb ekr_client ekr_server ekr_peer ekr_loop st_client
tsctp_SOURCES = tsctp.c
tsctp_LDADD = ../usrsctplib/libusrsctp.la
daytime_server_SOURCES = daytime_server.c
Expand All @@ -51,4 +51,5 @@ ekr_peer_SOURCES = ekr_peer.c
ekr_peer_LDADD = ../usrsctplib/libusrsctp.la
ekr_loop_SOURCES = ekr_loop.c
ekr_loop_LDADD = ../usrsctplib/libusrsctp.la

st_client_SOURCES = st_client.c
st_client_LDADD = ../usrsctplib/libusrsctp.la
7 changes: 6 additions & 1 deletion programs/Makefile.nmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ all: \
ekr_client \
ekr_server \
ekr_peer \
ekr_loop
ekr_loop \
st_client

client:
$(CC) $(CFLAGS) $(CVARSDLL) -c client.c
Expand Down Expand Up @@ -89,6 +90,10 @@ ekr_loop:
$(CC) $(CFLAGS) $(CVARSDLL) -c ekr_loop.c
link -out:ekr_loop.exe ekr_loop.obj $(LINKFLAGS)

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

clean:
del /F client.exe
del /F client.obj
Expand Down
Loading

0 comments on commit 010fcbc

Please sign in to comment.