Creating an chat application using xmppframework. When ever I try to connect to the server it connects & disconnected immediately & throws the following error.
error domain=gcdasyncsocketerrordomain code=7 socket closed by remote peer
It happens the same on Adium (chat app) software. Wondering any thing set wrong while setupping the Openfire on AWS Server.
https://community.igniterealtime.org/thread/50643
Please let me know If I need to follow any steps or such.
Thanks for reading.
You must store the new socket when the delegate method socket:didAcceptNewSocket been invoked
@property (nonatomic, strong) NSMutableArray *socketsArray;
- (void)viewDidLoad {
_socketsArray = [[NSMutableArray alloc] init];
}
- (void)socket:(GCDAsyncSocket *)sock didAcceptNewSocket:(GCDAsyncSocket *)newSocket {
[_socketsArray addObject:newSocket];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With