WebSockets .NET Client C#

QuickStart  1. Create a new Window Forms Application 2. Drop a TsgcWebSocketClient onto a Form and configure Host and Port Properties to connect to Server. 3. Drop a TButton in a Form, Double Click and type this code:  TsgcWebSocketClient1.Active = true; 4. Drop a Button onto the Form, Double Click and type this code:  TsgcWebSocketC...

Continue reading

WebSockets .NET Server C#

QuickStart 1. Create a new Window Forms Application 2. Drop a TsgcWebSocketServer onto a Form. 3. On Events Tab, Double click OnMessage Event, and type following code: private void OnMessage(TsgcWSConnection Connection, const string Text){ MessageBox.Show("Message Received From Client: " + Text);} 4. Drop a Button onto the Form, Double Click and ty...

Continue reading

WebSockets .NET

WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.The WebSocket protocol enables interaction between a web browser (or other client application, like .NET Application) and a web server with lower overhead than half-duplex alternatives such as HTTP polling, facilitating real-ti...

Continue reading

TCP Half-Open Connections

Once the connection has been established, if no peer sends any data, then no packets are sent over the net. TCP is an idle protocol, so it assumes that the connection is active. Disconnection reasons Application closes: when a process is finished, usually sends a FIN packet which acknowledges the other peer that connection has been closed. But if a...

Continue reading

Telegram Client

Telegram offers two kinds of APIs, one is Bot API which allows to create programs that use Bots and HTTPs as protocol. Telegram API and TDLib allows to build customized Telegram clients and is much more powerful than Bot API. From sgcWebSockets 4.3.7 supports TDLib through tdjson library (for Windows 32 and Windows 64), which means that you can bui...

Continue reading

sgcWebSockets and React client

sgcWebSockets library fully supports RFC6455, so any client that supports this RFC will be able to connect to our servers. You can connect with REACT to sgcWebSockets library without problems, just create a new class which implements WebSocket class and use it to connect, send messages, receive messages from server... React WebSocket Example  ...

Continue reading

SignalR Server and Client C#

sgcWebSockets supports SignalR and SignalRCore protocols, now we will see an example of how connect to a SignalR Server using a c# sample from CodeProject webpage, you can access to article using the following link: https://www.codeproject.com/Articles/5162436/Simple-SignalR-Server-and-Client-Applications-Demo#_articleTop This article shows ho...

Continue reading

Could not load SSL library

Some libraries, like Indy, use openssl to connect to secure servers using TLS. As some components from sgcWebSockets package are based on Indy library, make use of openssl libraries and sometimes you get an error message when you can load a library. There are several reasons why you can't load the openssl library. In the following lines I will...

Continue reading

WebSocket Upload File Demo

This is a demo which shows how upload a file to a websocket server. Follow the next steps: Select a file which will be sent to server.Then press connect. If connection is successful a message will show you are connected to server.Press upload button and when file has been transferred you will see a message confirming this. Upload File Demo Select f...

Continue reading

Obsolete Connection String using RSA

sgcWebSockets library allows to run Secure WebSocket Servers using openSSL libraries, if you start a new secure server and try to connect with a web browser like chrome, will run fine and shows a green lock for the wss connection. But if you check the details of connection, you will see that chrome complains about security of it. Fix Cipher Suite&n...

Continue reading