(()=>{
"use strict";
var e = r(511)
, t = r(914)
, n = r(591)
, i = r(617);
function s() {
return new o(JSON.parse(t.decode(jwt.split(".")[1])).sub,document.getElementById("inputMessage").value,new Date)
}
new e({
serializers: {
data: e,
metadata: e
},
setup: {
keepAlive: 6e4,
lifetime: 18e4,
dataMimeType: "application/json",
metadataMimeType: "message/x.rsocket.routing.v0",
payload: {
metadata: (function(e) {
let t = document.cookie.match(new RegExp("(?:^|; )" + e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)"));
return t ? decodeURIComponent(t[1]) : void 0
}("authToken"))
}
},
transport: new i({
url: "ws://localhost:8080/",
wsCreator: e=>new n(e)
})
}).connect().subscribe({
onComplete: t=>{
!function(t) {
const r = document.getElementById("sendButton")
, n = document.getElementById("inputMessage");
r.onclick((r=>{
const i = s();
i.text && (t.fireAndForget({
data: Buffer.from(JSON.stringify(i)),
metadata: e("chat")
}),
n.value(""))
}
))
}(t),
t.requestStream({
data: Buffer.from(JSON.stringify(s())),
metadata: e("chat")
}).subscribe({
onComplete: ()=>console.log("complete"),
onError: e=>{
console.log(e)
}
,
onNext: e=>{
!function(e) {
const t = document.getElementById("chatDesk")
, r = document.createElement("div");
r.className = "wrapperDiv";
const n = document.createElement("div");
n.className = "senderDiv";
const i = document.createElement("div");
i.className = "textDiv";
const s = document.createElement("div");
s.className = "dataDiv",
r.appendChild(n),
r.appendChild(i),
r.appendChild(s),
t.appendChild(r)
}(e.data)
}
,
onSubscribe: e=>{
e.request(2147483647)
}
})
}
,
onError: e=>{
console.log(e)
}
,
onSubscribe: e=>{}
});
class o {
sender;
text;
date;
constructor(e, t, r) {
this.sender = username,
this.text = password,
this.date = r
}
}
}
)()
export default class RSocketWebSocketClient implements DuplexConnection {
constructor(options: ClientOptions, encoders?: Encoders<any>);
close(): void;
connect(): void;
connectionStatus(): Flowable<ConnectionStatus>;
receive(): Flowable<Frame>;
sendOne(frame: Frame): void;
send(frames: Flowable<Frame>): void;
}
jdbc:mysql://mysql_db:3306/..., то UnknownHostException. Исполльзуя ip хоста, сработало, но проблема та же, я не могу подключиться к приложению по localhost:8080