mirror of https://github.com/deavminet/skippy.git
Set return value based on server's response
This commit is contained in:
parent
27460ccbc2
commit
538607fa56
|
@ -99,7 +99,7 @@ public class DClient
|
||||||
* @param message the message to send
|
* @param message the message to send
|
||||||
* @returns bool whether the send worked or not
|
* @returns bool whether the send worked or not
|
||||||
*/
|
*/
|
||||||
public void sendMessage(bool isUser, string location, string message)
|
public bool sendMessage(bool isUser, string location, string message)
|
||||||
{
|
{
|
||||||
/* The protocol data to send */
|
/* The protocol data to send */
|
||||||
byte[] protocolData;
|
byte[] protocolData;
|
||||||
|
@ -118,6 +118,11 @@ public class DClient
|
||||||
|
|
||||||
/* Send the protocol data */
|
/* Send the protocol data */
|
||||||
manager.sendMessage(1, protocolData);
|
manager.sendMessage(1, protocolData);
|
||||||
|
|
||||||
|
/* Receive the server's response */
|
||||||
|
byte[] resp = manager.receiveMessage(1);
|
||||||
|
|
||||||
|
return cast(bool)resp[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disconnect()
|
public void disconnect()
|
||||||
|
|
Loading…
Reference in New Issue