{"id":26820287,"url":"https://github.com/jinhyeonseo01/simplenetwork2","last_synced_at":"2025-06-21T20:04:53.555Z","repository":{"id":236693632,"uuid":"740348139","full_name":"jinhyeonseo01/SimpleNetwork2","owner":"jinhyeonseo01","description":"C# asynchronous Multi-Core server/client socket library based on IOCP - EAP SocketAsyncEventArgs supporting TCP/UDP","archived":false,"fork":false,"pushed_at":"2024-04-28T06:42:18.000Z","size":76,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T12:07:46.105Z","etag":null,"topics":["async","asynchronous","client","csharp","eap","iocp","multithreading","server","socket","socketasynceventargs","task","tcp","udp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jinhyeonseo01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-08T06:52:36.000Z","updated_at":"2025-03-27T12:40:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"3aba5c84-01e4-4ac5-9a7b-bc747610a3a8","html_url":"https://github.com/jinhyeonseo01/SimpleNetwork2","commit_stats":null,"previous_names":["jinhyeonseo01/simplenetwork2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jinhyeonseo01/SimpleNetwork2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhyeonseo01%2FSimpleNetwork2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhyeonseo01%2FSimpleNetwork2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhyeonseo01%2FSimpleNetwork2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhyeonseo01%2FSimpleNetwork2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jinhyeonseo01","download_url":"https://codeload.github.com/jinhyeonseo01/SimpleNetwork2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhyeonseo01%2FSimpleNetwork2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261186768,"owners_count":23121942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","asynchronous","client","csharp","eap","iocp","multithreading","server","socket","socketasynceventargs","task","tcp","udp"],"created_at":"2025-03-30T06:30:23.061Z","updated_at":"2025-06-21T20:04:48.522Z","avatar_url":"https://github.com/jinhyeonseo01.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Network 2\n\n- **C# asynchronous Multi-Core server/client socket library based on IOCP - EAP SocketAsyncEventArgs supporting TCP/UDP.**  \n  C# Tcp/Udp를 지원하는 IOCP - EAP SocketAsyncEventArgs, TaskPool 기반 비동기 멀티코어 서버/클라 소켓 라이브러리.\n- **A structure optimized for the GC to minimize memory leaks as much as possible.**  \n  메모리 누수를 최대한 제거해서 GC에 최적화된 구조.\n\u003cbr/\u003e\u003cbr/\u003e\n\n### *2018.08.01*\n* * *\n## Examples\n\n``` csharp\nStandardServer server;\nStandardClient client;\nstatic void Main(string[] args)\n{\n    new SampleServer();\n}\n\nStandardServer server;\nStandardClient client;\n\npublic SampleServer()\n{\n    server = new StandardServer();\n    // Wait Server Socket Open Time\n    client = new StandardClient();\n    \n    // Use Network\n    // Wait Server Close Event\n\n    server.close();\n    client.client.Close();\n}\n\npublic class StandardClient\n{\n    public SNClient client;\n    public StandardClient()\n    {\n        client = new SNClient();\n        client.Setting(\"127.0.0.1\", 55700, SocketType.Tcp);\n        client.Start(() =\u003e\n        {\n            Console.WriteLine(\"Connect\");\n        });\n    }\n}\n\n\npublic class StandardServer : IServerToss, IServerSpaceLogic\n{\n    SNServer server;\n\n    public StandardServer()\n    {\n        server = new SNServer();\n        var spaceSystem = new SpaceSystem(64);\n        server.spaceSystem = spaceSystem;\n        server.DefualtSpace = spaceSystem.CreateSpace();\n        server.DefualtSpace.LogicProcess = this;\n        server.DefualtSpace.TossProcess = this;\n        server.Setting(55700, SocketType.Tcp);\n        server.Start();\n    }\n\n    public void DataToss(SNServerClientSocket NowSocket, SNBuffer Read, SNBuffer My, SNBuffer Other) {\n        int packetId = Read.GetInt();\n        switch (packetId)\n        {\n            case 0:\n            {\n                int index;\n                My.Start(out index);\n                    int size = Read.EndPoint - 4;\n                    My.PutInt(0);\n                    My.PutB2BVar(Read, size);\n                My.End(index);\n                break;\n            }\n            case 1:\n            {\n                int index;\n                Other.Start(out index);\n                    int size = Read.EndPoint - 4;\n                    Other.PutInt(0);\n                    Other.PutB2BVar(Read, size);\n                Other.End(index);\n                break;\n            }\n            case 2:\n            {\n\n                break;\n            }\n        }\n    }\n\n    public void CreateSpace() {\n        \n    }\n\n    public void InClient(SNServerClientSocket clientIn) {\n        Console.WriteLine($\"Client Enter : {clientIn.socket.RemoteEndPoint}\");\n    }\n\n    public void Loop(List\u003cSNServerClientSocket\u003e clients) {\n        \n    }\n\n    public void OutClient(SNServerClientSocket clientOut) {\n        Console.WriteLine($\"Client Exit : \");\n    }\n\n    public void close() {\n        server.Close();\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinhyeonseo01%2Fsimplenetwork2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjinhyeonseo01%2Fsimplenetwork2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinhyeonseo01%2Fsimplenetwork2/lists"}