Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有關JarhfStomp4Net 使用 #1

Open
Elliot9 opened this issue Jun 22, 2017 · 6 comments
Open

有關JarhfStomp4Net 使用 #1

Elliot9 opened this issue Jun 22, 2017 · 6 comments

Comments

@Elliot9
Copy link

Elliot9 commented Jun 22, 2017

你好 , 我正需要這個
websocket Server端是由 sockjs跟stomp-client 組合
而我打算 使用 C# winsform 完成client端
請問我該怎麼著手? 有沒有什麼方向 或是 範本 謝謝

@jarhf
Copy link
Owner

jarhf commented Jul 4, 2017

@Elliot9 我这个代码就是C# WinForm客户端。 通信协议是sockjs规范, 内容协议是stomp ,我的server端是spring websocket. 客户端StompClient用法很简单, readme中有订阅消息的示例代码, 还有一个常用的方法就是发送消息。

@fkahhaleh
Copy link

Websocket4Net is broken with Spring websocket server (stomp implementation).
It is not the JarhfStomp4Net project that is not working, but the usage of Websocket4Net is the problem.
(two other projects have the same issue cause they use the above mentioned websocket library)

I have implemented websocketSharp in JarhfStomp4Net and it works perfect with Spring Websocket.

@jarhf
Copy link
Owner

jarhf commented Aug 1, 2017

@fkahhaleh Because Spring Websocket server using SockJs protocol, the message body start with 'a','m' or 'c' , well the Websocket4Net don't know

@fkahhaleh
Copy link

@jarhf , it makes sense now. (I was planning to look at the sourcecode to understand why, thanks for saving me the trouble)

Question, does this make Websocket4Net not 100% compatible/standard with WebSocket protocols?
or is Spring/SockJS the one not standard?

Thanks

@jarhf
Copy link
Owner

jarhf commented Aug 2, 2017

@fkahhaleh WebSocket is lower protocol, SockJs is over on WebSocket, it implement text message communication. Look at the SockJsClient
I had translated from sock.js (javascript) into C# using Websocket4Net.dll

@fkahhaleh
Copy link

@jarhf , Yes you are right. That is why I decided to work on the code to allow the user to choose or extend with relative ease the WebSocket implementation to use.
Certain libraries are better than others I think in some cases.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants