473,804 Members | 3,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Socket problem with whitespaces

1 New Member
Hello!

I am a java programmer who is learning C++. I am working on a project that requires a JAVA server I have written to interact with a C++ client I am currently writting. I am having difficulties writing out on the socket, specifically I try and send a char* array over the socket with whitespaces but the socket seems to only send up to the first white space. Can you help me send a message over the socket?

<code>send(sock ,"Does this work?", 15, 0);</code>

This results in "Does" on the server side. Thanks for the help!
Mar 17 '09 #1
0 1116

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2145
by: Satya Arjunan | last post by:
Hi everyone, I would like to send an option argument which is a quoted string with whitespaces to a python program. For example: $ ./myprogram.py --includedir="/usr/include /usr/local/include" --libdir="/usr/lib /usr/local/lib" However, sys.argv breaks the arguments whenever it encounter spaces, like this:
3
1525
by: Manuel Yguel | last post by:
I try to parse an indented xml file with dom xerces c++. the file is like that : <root> <child1> <field1> foo </field1> <field2> bar </field2> </child1> <child2> <field1> foo </field1> <field2> bar </field2>
2
3541
by: josh.asbury | last post by:
I am having some major issues with whitespace in my XSL stylesheets. We recently upgraded our servlet-based application to JDK 1.4, and this has forced the issue of my finally upgrading to Xalan-Java 2. The earlier version of Xalan was much more forgiving in regards to whitespace in our .xsl files, and now I am learning all about <xsl:text> and <xsl:strip-space>. I've come across something with HTML buttons, though, that I can't find a...
3
2986
by: Chris Mantoulidis | last post by:
I posted this here one day ago but it seems like it hasn't been put up for some unknown reason. That gives me a chance to say things a bit better in this post. 1st of all let's desribe the problem: In ParamGenerate() I want to find all whitespaces before a certain point in one string. Thus I use the string::find() function. However it seems like this function ignores some whitespaces :/ This is really weird and I need your help. Okay...
1
1763
by: Linus Rörstad | last post by:
Hello! I have created a xml-file by using the writeXml method on a dataset. The problem arrises when I want to read the xml-file back into a dataset on a pocket pc application. Some of the fields which are strings have whitespaces added to end of the values in the dataset but not in the xml-file. How do I read the xml-file without getting the whitespaces? This is a part of the xml-file: - <User>
8
2557
by: MNQ | last post by:
Hello All Im trying to relearn ANSI C. I have written some code but cannot understand why it is not do what i think it should. It prints the error message and the menu twice but i cant understand why. Can any one help me please? naveed /* Last modified 5 February 2004
1
1704
by: rj | last post by:
Hello, I try to remove whitespaces from a string using the preg_replace function like preg_replace("/*/"," ",$string); This works great, but makes no handles all characters in the same way. I want to preserve data between double quotes. So, hello world "It is a sunny... world"
4
1805
by: dwergkees | last post by:
Hi, Got a litte problem here. I'm trying to create a XSLT file that will do a transformation from WordML format (MS Word XML format, see http://rep.oio.dk/Microsoft.com/officeschemas/welcome.htm) to a reasonably clean (X)HTML format. (The reason being that, combined with some PHP scripting it should be possible to store the embedded images, which is pretty neat).
5
2330
by: mishink7 | last post by:
i was wondering how would u remove multiple whitespaces from the middle of a string to make it only one white space...for example: string hi= "hi bye"; then remove the multiple whitespaces in middle to make it "hi bye" any help would be appreciated...thanks.
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.