Last change
on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
415 bytes
|
Line | |
---|
1 | package mk.ukim.finki.busngobackend.service
|
---|
2 |
|
---|
3 | import org.springframework.messaging.simp.SimpMessagingTemplate
|
---|
4 | import org.springframework.stereotype.Service
|
---|
5 |
|
---|
6 | @Service
|
---|
7 | class WebSocketService(
|
---|
8 | private val messagingTemplate: SimpMessagingTemplate,
|
---|
9 | ) {
|
---|
10 | fun sendMessage(
|
---|
11 | topicSuffix: String,
|
---|
12 | message: String,
|
---|
13 | ) {
|
---|
14 | messagingTemplate.convertAndSend("/topic/$topicSuffix", message)
|
---|
15 | }
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.