Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 09:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



login server

Discussion on login server within the C/C++ forum part of the Coders Den category.

Closed Thread
 
Old 09/08/2012, 23:07   #16
 
lolix3's Avatar
 
elite*gold: 10
Join Date: Sep 2010
Posts: 348
Received Thanks: 298
Quote:
Originally Posted by MrSm!th View Post
If it really has syntax errors, it obviously cannot compile.
I didn't find any syntax errors btw.
No i have make a Mistake my "error" was only replaced by a smily ""

Greetz
lolix3 is offline  
Old 09/09/2012, 01:47   #17
 
ernilos's Avatar
 
elite*gold: 20
Join Date: Jan 2012
Posts: 766
Received Thanks: 645
Change the port of login server to 1337(The game uses that for login server :P)
ernilos is offline  
Old 09/09/2012, 17:24   #18
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
Quote:
Originally Posted by ernilos View Post
Change the port of login server to 1337(The game uses that for login server :P)
Switches off
szymek111 is offline  
Old 09/16/2012, 00:38   #19
 
elite*gold: 0
Join Date: Dec 2011
Posts: 367
Received Thanks: 199
Code:
#pragma comment(lib,"ws2_32.lib")
#include <WinSock2.h>
#include <iostream>
#include <stdio.h>
#include <tchar.h>

int _tmain(int argc, _TCHAR* argv[])
{
WSAData wsa;
WORD Version = MAKEWORD(2,1);
WSAStartup(Version, &wsa);

SOCKET Listen = socket(AF_INET, SOCK_STREAM, 0);
SOCKET Connect = socket(AF_INET, SOCK_STREAM, 0);

SOCKADDR_IN Server;

char ip[[b]14[/b]] = "86.63.109.231";
int port = 4003;
Server.sin_addr.s_addr = inet_addr(ip);
Server.sin_family = AF_INET;
Server.sin_port = htons(port);

bind(Listen, (SOCKADDR*)&Server, sizeof(Server));

listen(Listen, 1);
int size = sizeof(Server);

std::cout << "--------------------------------------------------------------------------------"
<< " Server connected." << std::endl
<< " Host: " << ip << " : " << port << std::endl
<< "--------------------------------------------------------------------------------" << std::endl;
for(;;){
if(Connect = accept(Listen, (SOCKADDR*)&Server, &size)){
std::cout << "Connection accepted from: " << inet_ntoa(Server.sin_addr) << std::endl;
char recvbuf[225];
recv(Connect,recvbuf,225,0);
std::cout << recvbuf << std::endl;
}

}

WSACleanup();
std::cin.get();
return 0;
}
is correct
Kingrap is offline  
Thanks
1 User
Old 09/16/2012, 15:58   #20
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
Kingrap Thanks !!!Please close
szymek111 is offline  
Closed Thread


Similar Threads Similar Threads
Warrock Pvp Server Complete Succesfully Game Login But Login Map Error :S
02/22/2011 - WarRock - 7 Replies
Hi friends succesfully warrock pvp server and game login ıd pw succesfully server list WREMU Create room friedns came friends ready game start do not be eniting please help :(
Hot ice Down oder login Server down!!Wenn ja sagt wolfi bescheid dass login down ist
01/01/2010 - Metin2 Private Server - 1 Replies
hallo kann jmnd bescheid sagen bitte



All times are GMT +1. The time now is 09:07.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.