473,382 Members | 1,204 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

networking help 2

CODE
public static void web(Socket suck )
{
byte [] rbuffer =new byte[BUFSIZE+1];
byte [] sbuffer =new byte[BUFSIZE+1];
string str="<HTML><BODY><H1>nweb Web Server
Sorry:</H1></BODY></HTML>\r\n";
sbuffer=str//error can convet
suck.Receive(rbuffer);
suck.Send(sbuffer);//cant send data as only byte array can
be send

}
how can an string be converted to a byte array.
Even convert class is not useful
plz help

Dec 1 '05 #1
2 994
lucifer,

Check out the Encoding class in the System.Text namespace.
Specifically, you have to decide on which kind of encoding you wish to use.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"lucifer" <um**********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
CODE
public static void web(Socket suck )
{
byte [] rbuffer =new byte[BUFSIZE+1];
byte [] sbuffer =new byte[BUFSIZE+1];
string str="<HTML><BODY><H1>nweb Web Server
Sorry:</H1></BODY></HTML>\r\n";
sbuffer=str//error can convet
suck.Receive(rbuffer);
suck.Send(sbuffer);//cant send data as only byte array can
be send

}
how can an string be converted to a byte array.
Even convert class is not useful
plz help

Dec 1 '05 #2
thanks

Dec 1 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hyperbob | last post by:
Hello, I'm in the design stage of an application that will consist of two or more processes that will be either on different computers in a network or on the same computer and will have to...
6
by: James Egan | last post by:
I've seen some networking toolkits for C++, but was wondering if there were (or plans for) a standard set of networking classes for C++? Also, can someone tell me where I can find a...
7
by: Brian Keogh | last post by:
Hi, I'm a student learning TCP/IP networking at University. Although I understand all about TCP/IP Networking in Java I am expected to understand the basics of C with regard to these programs as...
46
by: H.A. Sujith | last post by:
Why doesn't the standard library provide (at least basic) networking facilities using TCP/IP ?
4
by: Raj | last post by:
I want to program C with networking. Can anyone tell me the How to start with a small simple program can it possible in turbo/borland c 3+. or i should go for another verson. i am using windows...
0
by: petro | last post by:
I am trying to deploy an asp.net application to my web server. My application uses system.data.oledb to connect to an oracle database. On my development machine I have the oracle client 10g...
2
by: JCB19 | last post by:
I need help networking my HP DV4000 laptop to my home network. I have wireless home network with 3 computers using Linksys Wireless G The laptop has built in wireless capability. I want to...
1
by: ebrimagillen | last post by:
Want to know the difference between URL networking and Socket networking. Also and example from each and the networking technique is most appropriate for the example.
1
by: chinaemerem ibeawuchi | last post by:
What is the difference between URL networking and Socket networking? with an example of each type and state why the choosen networking technique is most appropriate for the example.
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.