AutosoftDMS / SignalR-Swift

SignalR client library written in pure Swift
MIT License
60 stars 55 forks source link

Server sent events transport #11

Closed vldalx closed 7 years ago

vldalx commented 7 years ago

I've implemented Server Sent Events transport based on SignalR-ObjC library. Unfortunately, I didn't test the new code enough because I don't have time at the moment and I'll be not available during the next couple of weeks. That's why I didn't replace comment to ServerSentEventsTransport() If someone has a time, please take a look at my code. Maybe everything works as it should.

jordancamara commented 7 years ago

I will take a look at this and test it later this week. Thanks, @vldalx

vldalx commented 7 years ago

@jordancamara I've tested the PR in my chat app. It seems like everything works.

During my tests, I changed the code in Connection class form

public func start() {
    self.start(transport: AutoTransport())
}

to

public func start() {
    self.start(transport: AutoTransport(withTransports: [ServerSentEventsTransport()]))
}