Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // server.Program
- using PABCSystem;
- using System;
- using System.Net;
- using System.Net.Sockets;
- using System.Threading.Tasks;
- public static void $Main()
- {
- server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- server.Bind(new IPEndPoint(IPAddress.Parse("0.0.0.0"), 4120));
- server.Listen(100);
- PABCSystem.PABCSystem.Writeln("Bound to the port 4120. Ready!");
- int num = 0;
- if (handlers != null)
- {
- num = handlers.Length;
- }
- int newSize = 0;
- Array.Resize(ref handlers, newSize);
- if (!$InParallelSection)
- {
- $for_class0 @object = new $for_class0();
- if (!PABCSystem.PABCSystem.OMP_NESTED)
- {
- $InParallelSection = true;
- }
- Parallel.For(1, 1410065409, @object.Method);
- if (!PABCSystem.PABCSystem.OMP_NESTED)
- {
- $InParallelSection = false;
- }
- return;
- }
- int num2 = 1410065408;
- int num3 = 1;
- if (num3 > num2)
- {
- return;
- }
- while (true)
- {
- handler = server.Accept();
- int num4 = 0;
- if (handlers != null)
- {
- num4 = handlers.Length;
- }
- int newSize2 = handlers.Length + 1;
- Array.Resize(ref handlers, newSize2);
- int num5 = handlers.Length - 1;
- handlers[num5] = handler;
- processUser(num5);
- if (num3 < num2)
- {
- num3++;
- continue;
- }
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement