mirror of
https://github.com/deavmi/birchwood
synced 2024-09-20 13:43:19 +02:00
Client
- Cleaned up imports
This commit is contained in:
parent
24f548820a
commit
f85fcde112
@ -4,7 +4,7 @@
|
|||||||
module birchwood.client.client;
|
module birchwood.client.client;
|
||||||
|
|
||||||
import std.socket : Socket, SocketException, Address, getAddress, SocketType, ProtocolType, SocketOSException;
|
import std.socket : Socket, SocketException, Address, getAddress, SocketType, ProtocolType, SocketOSException;
|
||||||
import std.socket : SocketFlags;
|
import std.socket : SocketFlags, SocketShutdown;
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
import std.container.slist : SList;
|
import std.container.slist : SList;
|
||||||
import core.sync.mutex : Mutex;
|
import core.sync.mutex : Mutex;
|
||||||
@ -14,6 +14,7 @@ import eventy : EventyEvent = Event, Engine, EventType, Signal, EventyException;
|
|||||||
import birchwood.config;
|
import birchwood.config;
|
||||||
import birchwood.client.exceptions : BirchwoodException, ErrorType;
|
import birchwood.client.exceptions : BirchwoodException, ErrorType;
|
||||||
import birchwood.protocol.messages : Message, encodeMessage, decodeMessage, isValidText;
|
import birchwood.protocol.messages : Message, encodeMessage, decodeMessage, isValidText;
|
||||||
|
import birchwood.protocol.constants : ReplyType;
|
||||||
|
|
||||||
import birchwood.client.receiver : ReceiverThread;
|
import birchwood.client.receiver : ReceiverThread;
|
||||||
import birchwood.client.sender : SenderThread;
|
import birchwood.client.sender : SenderThread;
|
||||||
@ -165,8 +166,6 @@ public class Client : Thread
|
|||||||
/* Default implementation */
|
/* Default implementation */
|
||||||
logger.log("Response("~to!(string)(commandReply.getReplyType())~", "~commandReply.getFrom()~"): "~commandReply.toString());
|
logger.log("Response("~to!(string)(commandReply.getReplyType())~", "~commandReply.getFrom()~"): "~commandReply.toString());
|
||||||
|
|
||||||
import birchwood.protocol.constants : ReplyType;
|
|
||||||
|
|
||||||
if(commandReply.getReplyType() == ReplyType.RPL_ISUPPORT)
|
if(commandReply.getReplyType() == ReplyType.RPL_ISUPPORT)
|
||||||
{
|
{
|
||||||
// TODO: Testing code was here
|
// TODO: Testing code was here
|
||||||
@ -1193,7 +1192,6 @@ public class Client : Thread
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Shut down socket AND close it */
|
/* Shut down socket AND close it */
|
||||||
import std.socket : SocketShutdown;
|
|
||||||
socket.shutdown(SocketShutdown.BOTH);
|
socket.shutdown(SocketShutdown.BOTH);
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user