Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netsocket: remove unused socketReadDisconnected() function #4097

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/netplay/error_categories.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
///
/// Please see the bug https://github.com/microsoft/STL/issues/3254 for the explanation
/// as to why we would need to use a custom error category (at least on Windows).
///
/// NOTE: Currently, for OSes other than Windows, error messages are obtained via
/// `strerror()` function, which is influenced by the `LC_MESSAGES` locale category.
/// This shouldn't be a problem, though, as opposed to Windows, which suffers from the
/// aforementioned bug in MSVC STL.
/// </summary.
class GenericSystemErrorCategory : public std::error_category
{
Expand Down
5 changes: 0 additions & 5 deletions lib/netplay/netsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,6 @@ net::result<ssize_t> readNoInt(Socket& sock, void *buf, size_t max_size, size_t
return received;
}

bool socketReadDisconnected(const Socket& sock)
{
return sock.readDisconnected;
}

/**
* Similar to write(2) with the exception that this function will block until
* <em>all</em> data has been written or an error occurs.
Expand Down
1 change: 0 additions & 1 deletion lib/netplay/netsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ bool socketSetTCPNoDelay(Socket& sock, bool nodelay); ///< nodelay = true disabl

// Sockets, compressed.
void socketBeginCompression(Socket& sock); ///< Makes future data sent compressed, and future data received expected to be compressed.
bool socketReadDisconnected(const Socket& sock); ///< If readNoInt returned 0, returns true if this is the result of a disconnect, or false if the input compressed data just hasn't produced any output bytes.
void socketFlush(Socket& sock, uint8_t player, size_t *rawByteCount = nullptr); ///< Actually sends the data written with writeAll. Only useful on compressed sockets. Note that flushing too often makes compression less effective. Raw count of bytes (after compression) returned in rawByteCount.

// Socket sets.
Expand Down
Loading