Searching system in messages and update status and last seen for users

This commit is contained in:
2025-06-09 14:50:35 +03:30
parent 8b6c4fea97
commit be9cde5c6b
6 changed files with 251 additions and 21 deletions
@@ -1,5 +1,7 @@
package org.to.telegramfinalproject.Server;
import org.to.telegramfinalproject.Database.userDatabase;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
@@ -10,6 +12,8 @@ public class MainServer {
public static void main(String[] args) {
try (ServerSocket serverSocket = new ServerSocket(PORT)) {
System.out.println("Server started on port " + PORT);
userDatabase.setAllUsersOffline();
while (true) {
Socket clientSocket = serverSocket.accept();