Skip to content

Commit

Permalink
Socket: Assume anything that isn't Windows is supported by junixsocket
Browse files Browse the repository at this point in the history
  • Loading branch information
caoimhebyrne committed Apr 24, 2023
1 parent e6d48fe commit a8f1c28
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/dev/cbyrne/kdiscordipc/core/socket/Socket.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ interface Socket {
object SocketProvider {
@JvmStatic
fun systemDefault(): Socket {
if (platform == Platform.UNKNOWN)
throw NotImplementedError()

if (platform == Platform.WINDOWS)
return WindowsSocket()

// Anything that's non-Windows is assumed to be supported by junixsocket.
// If not, it will explode on its own :)
return UnixSocket()
}
}

0 comments on commit a8f1c28

Please sign in to comment.