IRCConnection: Make the socket class configurable

This makes using TLS possible.

FossilOrigin-Name: 38de3de8ed2056e1116492cc44443d814ff115d85b81ba5c9014d0bf925a0f83
This commit is contained in:
Jonathan Schleifer 2017-01-22 17:24:17 +00:00
parent 47e0929527
commit 21784a8d30
2 changed files with 13 additions and 2 deletions

View file

@ -28,6 +28,8 @@
@protocol IRCConnectionDelegate <OFObject>
@optional
- (void)connection: (IRCConnection*)connection
didCreateSocket: (OF_KINDOF(OFTCPSocket)*)socket;
- (void)connection: (IRCConnection*)connection
didReceiveLine: (OFString*)line;
- (void)connection: (IRCConnection*)connection
@ -72,7 +74,8 @@
@interface IRCConnection: OFObject
{
OFTCPSocket *_socket;
Class _socketClass;
OF_KINDOF(OFTCPSocket) *_socket;
OFString *_server;
uint16_t _port;
OFString *_nickname, *_username, *_realname;
@ -80,6 +83,7 @@
id <IRCConnectionDelegate> _delegate;
}
@property (assign) Class socketClass;
@property (copy) OFString *server;
@property (assign) uint16_t port;
@property (copy) OFString *nickname, *username, *realname;