Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 05:37

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

Advertisement



C++ Winsock2 sending an ENTER?

Discussion on C++ Winsock2 sending an ENTER? within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
Received Thanks: 43
C++ Winsock2 sending an ENTER?

Hello! I am willing to send an enter using Winsock TCP/IP to a browser.
The enter is being used inside a HTTP Message, so it cannot simply be '\n'.
Is there maybe a char for enter?

Any idea on how I can achieve the enter in this case will be appreciated

Thanks in advance,
jackpotsvr

EDIT-

Figured that octal number 12 is an enter. so
char ENTER = 0012;
Though still haven't figured how I could add this in my HTTP message.
jackpotsvr is offline  
Old 08/08/2012, 23:14   #2
 
elite*gold: 0
Join Date: Jul 2010
Posts: 388
Received Thanks: 196
Quote:
Originally Posted by jackpotsvr View Post
Hello! I am willing to send an enter using Winsock TCP/IP to a browser.
The enter is being used inside a HTTP Message, so it cannot simply be '\n'.
Is there maybe a char for enter?

Any idea on how I can achieve the enter in this case will be appreciated

Thanks in advance,
jackpotsvr

EDIT-

Figured that octal number 12 is an enter. so
char ENTER = 0012;
Though still haven't figured how I could add this in my HTTP message.
Check how a browser does it.
SmackJew is offline  
Old 08/09/2012, 01:35   #3


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,908
Received Thanks: 25,409
Quote:
Figured that octal number 12 is an enter. so
char ENTER = 0012;
Though still haven't figured how I could add this in my HTTP message.
Btw. \n is an escape sequence and replaced by 12 by the compiler.
MrSm!th is offline  
Thanks
1 User
Old 08/09/2012, 12:24   #4

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
Received Thanks: 43
At first I just used an ascii to octal convert, and converted an 'enter' to octal which gave me 0012. So I made a char with that octal value, and a string which value was equal to the char.

PHP Code:
char  ENTER 0012;
string ENDLSTR;
string text;
ENDLSTR char(ENTER); 
In the end I figured it was a way easier.. With this small piece of code I achieved the same

PHP Code:
string ENDLSTR '\n'
Good luck all, cya, Thanks
jackpotsvr is offline  
Old 08/09/2012, 12:34   #5


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,908
Received Thanks: 25,409
That's what I said..
MrSm!th is offline  
Old 08/09/2012, 16:10   #6

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
Received Thanks: 43
Quote:
Originally Posted by MrSm!th View Post
That's what I said..
Indeed, that's what you said.
jackpotsvr is offline  
Reply


Similar Threads Similar Threads
Not Sending
11/27/2010 - AutoIt - 10 Replies
Hi there, I am trying to Send or ControlSend to a program but it appears to be 'blocked'. Is there a way round this in Autoit? The logic and syntax are fine as it works OK sending to Notepad. Tearing my hair out :(
can modify tzphqy use winsock2?
01/24/2009 - Dekaron - 5 Replies
thai dekaron server used winsock2 , how to modify or emulate Tzphqy use winsock2? help me please.....
sending
02/17/2008 - Say Hello - 1 Replies
Hello!



All times are GMT +1. The time now is 05:42.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.