Releases: ivanfetch/chatserver
Releases · ivanfetch/chatserver
v0.0.1
Changelog
- aea9d9e Add Github workflow, log the expected string when it can't be read from the network during tests, address slow Github Actions Windows runners with OS-specific network-read and test timeouts, add a test to alert if/when Windows runners are no longer slow
- 4b4b03f Add ReadMe, Makefile, goreleaser config, and other small fixes
- 5d9db9b Add Server.HasExited(), added test-helper readStringWithTimeout(), and update TestChatSession() to read chat output and expect substrings
- 9d0c409 Add TestScript tests, use io instead of ioutil, fix unchecked error, bump Go to 1.21
- 3507097 Add WaitGroup to know all goroutines are done before program exit, misc. cleanup / commenting
- fbea589 Add command-line processing
- bd9a5fc Add function examples for pkg docs, fix unchecked error from ListenAndServe, fix GetListenAddress when Server.listenAddress is nil, add log output about how to exit the server
- 72abcc0 Add functional options for NewServer(), and WithListenAddress()
- c96419d Add license
- 9470efd Change default listen port, check the error returned by listenAndServe
- 0472622 Clean up the look of the connection-and-message-manager loop
- 9ca5fde Code and documentation cleanup
- 47349c5 Finish connection-manager cleanup then exit, type connection implements Read and Write methods to avoid errors for closed connections, failed attempt at seasing to accept connections while cleaning up / exiting
- 2345be1 Fix TestScript test for debug-logging when the chat-server invocation doesn't stick around for long
- 499a64e Improve connection-manager clean + close channels during cleanup
- ebc05a3 Initial commit
- 853f717 MOve chat-server code into a package
- 89f6ddb Move logging from a global variable to a Server struct member, differentiate info vs. debug logging, Testing only shows chat-server logs when
test -v
is run - 5b6e769 ONly send a system goodbye message if there are connections at the time the server initiates its exit
- df0d460 Refactor message broadcasting to not pass the
currentConnections
slice! - 3391a55 Rename package from chatserver to chat to avoid name-studdering
- 36ef79b Represent chat connections as a struct that includes an optional nickname and uses
net.Conn.RemoteAddr()
with the nickname as a unique ID - bcd6621 Respond to sig-term and sig-exit signals and cleanup, plus documentation and cleanup
- 48dcf70 Send system messages when clients change nickname or join/leave the chat, update test to cover a second client + client1 leaving chat
- 5dd7ca3 Server.InitiateShutdown()' no longer requires a parameter about whether the server has current connections
- f81f3c5 Switch
stopCh
from a send-only channel - d77c468 Switch from passing many parameters around to a
Server
struct with existing functions becoming receivers - 5521977 Switch from stopCh to os/signal.NotifyContext(), make more use of our server.shuttingDown bool
- 41c50a7 TestScript tests use a random chat-server listen port to avoid clashing, send
has joined the chat
announcements duringServer.processInput()
to avoid an output race condition for tests,NewServer()
defaults to a random listen-port - 70d540a Update ReadMe with CI test badge and go-pkg-docs
- 1dd0f1a Update go.sum|mod, add the start of a chat-server test
- b7cf998 Update message-sending to each connection, from a direct write to that connection, to use a per-connection
receiveMessageCh
channel, also add a pointer to the server to the connection type