⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thread.cpp

📁 This programm is proxy server for ragnarok online game. Also it s can be use as bot. It control all
💻 CPP
字号:
#pragma warning(disable:4786) // anti-STL

#include "win_and_sock.h"
#include "data.h"

#include "thread.h"

#include <stdlib.h>
#include <stdio.h>
#include <set>

#include "proto/ttg_proto.h"
#include "proto/ctt_proto.h"
#include "proto/stt_proto.h"

//#include "bots/bot.h"

int TCRotation, TSRotation, TGRotation;

void do_send_tt_block(); // forward decl

char th_s[256];


int doListen()
{
    int res;
    res = listen( ListenSock, SOMAXCONN );
    if(res!=0)
        return 0;
    
    CSock = accept( ListenSock, NULL, NULL ); // blocking call;
    if(CSock == INVALID_SOCKET)
        return 0;
    CSockState = 1; // created, not connected

    send_tout(&tt, "Connection accepted."); do_send_tt_block();
    unsigned long arg = 1;
    res = ioctlsocket(CSock, FIONBIO, &arg);
    if(res!=0)
    {
        closesocket(CSock);
        return 0;
    }
    send_tout(&tt, "CSock 镥疱忮涓

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -