From b2fd6237a4f0657096f25e2e7e19c1f3f2ba3bbd Mon Sep 17 00:00:00 2001 From: hgouchet Date: Mon, 4 Mar 2019 22:58:17 +0100 Subject: [PATCH] adds samples --- server_test.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server_test.go b/server_test.go index 355e33a..49396fa 100644 --- a/server_test.go +++ b/server_test.go @@ -1,11 +1,19 @@ package tcp_test -import "testing" +import ( + "testing" -func TestNew(t *testing.T) { + "github.com/rvflash/tcp" +) +func ExampleNew() { + srv := tcp.New() + srv.SYN(sleep) + // now runs it! } func TestDefault(t *testing.T) { - + srv := tcp.Default() + srv.ACK(stumble) + // now runs it! }