mirror of
https://github.com/heroiclabs/nakama-java.git
synced 2026-11-24 08:55:49 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d771de35c1 | ||
|
|
15456d4e8c | ||
|
|
2222f178a6 | ||
|
|
e46d122d2d |
No files matched your search
@@ -6,6 +6,13 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.0.3] - 2019-10-25
|
||||
### Added
|
||||
- More ways to create a socket connection.
|
||||
|
||||
### Fixed
|
||||
- Correctly decode UserPresence from payload.
|
||||
|
||||
## [2.0.2] - 2019-10-14
|
||||
### Added
|
||||
- Add support for session vars.
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'com.heroiclabs.nakama'
|
||||
version = '2.0.2'
|
||||
version = '2.0.3'
|
||||
def description = 'Android optimized Java client for Nakama server.'
|
||||
def gopath = System.getenv('GOPATH')
|
||||
sourceCompatibility = 1.7
|
||||
|
||||
@@ -33,10 +33,12 @@ public class Channel {
|
||||
* The server-assigned channel ID.
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* The presences visible on the chat channel.
|
||||
*/
|
||||
private List<UserPresence> presences;
|
||||
|
||||
/**
|
||||
* The presence of the current user. i.e. Your self.
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,33 @@ public interface Client {
|
||||
*/
|
||||
SocketClient createSocket(final int port, final int socketTimeoutMs);
|
||||
|
||||
/**
|
||||
* Create a new socket from the client.
|
||||
* @param host The host URL of the server.
|
||||
* @param port The port number of the server. Default should be 7350.
|
||||
* @return a new SocketClient instance.
|
||||
*/
|
||||
SocketClient createSocket(final String host, final int port);
|
||||
|
||||
/**
|
||||
* Create a new socket from the client.
|
||||
* @param host The host URL of the server.
|
||||
* @param port The port number of the server. Default should be 7350.
|
||||
* @param ssl Whether to use SSL to connect to the server.
|
||||
* @return a new SocketClient instance.
|
||||
*/
|
||||
SocketClient createSocket(final String host, final int port, final boolean ssl);
|
||||
|
||||
/**
|
||||
* Create a new socket from the client.
|
||||
* @param host The host URL of the server.
|
||||
* @param port The port number of the server. Default should be 7350.
|
||||
* @param ssl Whether to use SSL to connect to the server.
|
||||
* @param socketTimeoutMs Sets the connect, read and write timeout for new connections.
|
||||
* @return a new SocketClient instance.
|
||||
*/
|
||||
SocketClient createSocket(final String host, final int port, final boolean ssl, final int socketTimeoutMs);
|
||||
|
||||
/**
|
||||
* Add one or more friends by id.
|
||||
* @param session The session of the user.
|
||||
|
||||
@@ -166,11 +166,26 @@ public class DefaultClient implements Client {
|
||||
return createSocket(port, 5000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketClient createSocket(final String host, final int port) {
|
||||
return createSocket(host, port, ssl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketClient createSocket(final int port, final int socketTimeoutMs) {
|
||||
return new WebSocketClient(host, port, ssl, socketTimeoutMs, this.trace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketClient createSocket(final String host, final int port, final boolean ssl) {
|
||||
return new WebSocketClient(host, port, ssl, 5000, this.trace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketClient createSocket(final String host, final int port, final boolean ssl, final int socketTimeoutMs) {
|
||||
return new WebSocketClient(host, port, ssl, socketTimeoutMs, this.trace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<Empty> addFriends(@NonNull final Session session, @NonNull final String... ids) {
|
||||
return getStub(session).addFriends(AddFriendsRequest.newBuilder().addAllIds(Arrays.asList(ids)).build());
|
||||
|
||||
@@ -46,7 +46,7 @@ public class MatchData {
|
||||
/**
|
||||
* Information on the user who sent the state change.
|
||||
*/
|
||||
private UserPresence userPresence;
|
||||
private UserPresence presence;
|
||||
|
||||
/**
|
||||
* Returns match data
|
||||
@@ -62,5 +62,5 @@ public class MatchData {
|
||||
/**
|
||||
* True if this data was delivered reliably, false otherwise.
|
||||
*/
|
||||
private Boolean reliable;
|
||||
private boolean reliable;
|
||||
}
|
||||
Reference in new issue
Block a user