Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
10cff3cf
Commit
10cff3cf
authored
Mar 07, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebSocket
parent
aede4750
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
RxWebSocket.java
...src/main/java/chat/rocket/android_ddp/rx/RxWebSocket.java
+8
-8
No files found.
android-ddp/src/main/java/chat/rocket/android_ddp/rx/RxWebSocket.java
View file @
10cff3cf
...
...
@@ -29,28 +29,28 @@ public class RxWebSocket {
(
FlowableOnSubscribe
<
RxWebSocketCallback
.
Base
>)
emitter
->
httpClient
.
newWebSocket
(
request
,
new
WebSocketListener
()
{
@Override
public
void
onOpen
(
WebSocket
webSocket
1
,
Response
response
)
{
RxWebSocket
.
this
.
webSocket
=
webSocket
1
;
public
void
onOpen
(
WebSocket
webSocket
,
Response
response
)
{
RxWebSocket
.
this
.
webSocket
=
webSocket
;
emitter
.
onNext
(
new
RxWebSocketCallback
.
Open
(
RxWebSocket
.
this
.
webSocket
,
response
));
}
@Override
public
void
onFailure
(
WebSocket
webSocket
1
,
Throwable
err
,
Response
response
)
{
public
void
onFailure
(
WebSocket
webSocket
,
Throwable
err
,
Response
response
)
{
try
{
emitter
.
onError
(
new
RxWebSocketCallback
.
Failure
(
webSocket
1
,
err
,
response
));
emitter
.
onError
(
new
RxWebSocketCallback
.
Failure
(
webSocket
,
err
,
response
));
}
catch
(
OnErrorNotImplementedException
ex
)
{
RCLog
.
w
(
ex
,
"OnErrorNotImplementedException ignored"
);
}
}
@Override
public
void
onMessage
(
WebSocket
webSocket
1
,
String
text
)
{
emitter
.
onNext
(
new
RxWebSocketCallback
.
Message
(
webSocket
1
,
text
));
public
void
onMessage
(
WebSocket
webSocket
,
String
text
)
{
emitter
.
onNext
(
new
RxWebSocketCallback
.
Message
(
webSocket
,
text
));
}
@Override
public
void
onClosed
(
WebSocket
webSocket
1
,
int
code
,
String
reason
)
{
emitter
.
onNext
(
new
RxWebSocketCallback
.
Close
(
webSocket
1
,
code
,
reason
));
public
void
onClosed
(
WebSocket
webSocket
,
int
code
,
String
reason
)
{
emitter
.
onNext
(
new
RxWebSocketCallback
.
Close
(
webSocket
,
code
,
reason
));
emitter
.
onComplete
();
}
}),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment