Skip to content

Commit

Permalink
Rename main.bal to chat_service.bal
Browse files Browse the repository at this point in the history
  • Loading branch information
randilt committed Jan 9, 2025
1 parent 4839d0c commit a7cdf04
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ballerina/io;
import ballerina/tcp;
import ballerina/lang.'string;
import ballerina/tcp;

type ChatServer service object {
map<tcp:Caller> clients;
Expand Down Expand Up @@ -51,7 +51,7 @@ service class ChatConnectionService {

self.messageBuffer += message;
if self.messageBuffer.includes("\n") {
string[] messages = re`\r?\n`.split(self.messageBuffer);
string[] messages = re `\r?\n`.split(self.messageBuffer);
self.messageBuffer = messages[messages.length() - 1];

foreach string msg in messages.slice(0, messages.length() - 1) {
Expand Down

0 comments on commit a7cdf04

Please sign in to comment.