web socket

 0    10 fiche    tomekmarczak1
Télécharger mP3 Imprimer jouer consultez
 
question réponse
WebSocket to protokół komunikacji internetowej, który umożliwia dwukierunkową komunikację pomiędzy klientem a serwerem.
commencer à apprendre
WebSocket is a web communication protocol that allows two-way communication between a client and a server.
Oznacza to, że korzystając z WebSockets, nie musisz się martwić, że zapory sieciowe blokują ten port i uniemożliwiają przepływ danych pomiędzy klientem a serwerem.
commencer à apprendre
This means that when using WebSockets you don’t have to worry about firewalls blocking that port and preventing your data to flow between client and server.
A jeśli chcesz wysłać dane na serwer, po prostu użyj kolejnej metody swojego tematu:
commencer à apprendre
And if you want to send data to the server, simply use the next method of your subject:
W tym samouczku utworzymy prostą aplikację internetową, która implementuje przesyłanie wiadomości przy użyciu nowych możliwości protokołu WebSocket wprowadzonych w Spring Framework 4.0.
commencer à apprendre
In this tutorial, we’ll create a simple web application that implements messaging using the new WebSocket capabilities introduced with Spring Framework 4.0.
Po nawiązaniu połączenia WebSocket połączenie pozostaje otwarte do czasu, aż klient lub serwer zdecyduje się je zamknąć.
commencer à apprendre
Once a WebSocket connection is established, the connection stays open until the client or server decides to close this connection.
Typowym przypadkiem użycia może być sytuacja, w której wielu użytkowników komunikuje się ze sobą, na przykład na czacie.
commencer à apprendre
A typical use case could be when an app involves multiple users communicating with each other, such as in a chat.
W naszym przykładzie zbudujemy prostego klienta czatu.
commencer à apprendre
We will build a simple chat client in our example.
Ponieważ jest to projekt oparty na Maven, najpierw dodajemy wymagane zależności do pliku pom. xml
commencer à apprendre
Since this is a Maven-based project, we first add the required dependencies to the pom. xml
Najpierw włączamy możliwości protokołu WebSocket.
commencer à apprendre
First, we enable the WebSocket capabilities.
możliwości
commencer à apprendre
capabilities

Vous devez vous connecter pour poster un commentaire.