Click here to Skip to main content
15,845,103 members
Home / Discussions / C#
   

C#

 
GeneralRe: Man Down! Pin
Luc Pattyn12-Mar-09 7:51
sitebuilderLuc Pattyn12-Mar-09 7:51 
GeneralRe: ATM program in consol application Pin
musefan12-Mar-09 7:16
musefan12-Mar-09 7:16 
AnswerRe: ATM program in consol application Pin
musefan12-Mar-09 7:18
musefan12-Mar-09 7:18 
GeneralRe: ATM program in consol application Pin
fred_12-Mar-09 9:02
fred_12-Mar-09 9:02 
AnswerRe: ATM program in consol application Pin
Christian Graus12-Mar-09 11:37
protectorChristian Graus12-Mar-09 11:37 
Questionsocket programing Pin
behzadcp12-Mar-09 6:03
professionalbehzadcp12-Mar-09 6:03 
AnswerRe: socket programing Pin
Teuz12-Mar-09 6:15
Teuz12-Mar-09 6:15 
AnswerRe: socket programing Pin
Michael Bookatz12-Mar-09 6:18
Michael Bookatz12-Mar-09 6:18 
AnswerRe: socket programing Pin
Xmen Real 12-Mar-09 6:19
professional Xmen Real 12-Mar-09 6:19 
AnswerRe: socket programing Pin
Member 349379912-Mar-09 7:30
Member 349379912-Mar-09 7:30 
QuestionRe: socket programing Pin
ky_rerun12-Mar-09 7:56
ky_rerun12-Mar-09 7:56 
AnswerRe: socket programing Pin
behzadcp12-Mar-09 8:47
professionalbehzadcp12-Mar-09 8:47 
QuestionXML Pin
mrithula812-Mar-09 5:50
mrithula812-Mar-09 5:50 
Hi I am sending the ip address and the port no for the socket using the following syntax:
IPEndPoint ipep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 8050);
            Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            newsock.Bind(ipep);
Because of the connection problem i want to read both the ip address and the port no from an xml file.I do not exactly know how i should be storing data in an xml...In the xml file named p1.xml i have given the following:Please check whether this is right and give me your suggestions
<table width="100%" border="0">

<tr>
<td><address>127.0.0.1<address>
<td>
<tr>

<tr><td>
<port>10001<port>
<td><tr>


I am using the following code for reading the data from the xml file:
XmlTextreader reader = new XmlTextReader("p1.xml");
            while (reader.Read())
            {
                switch (reader.NodeType)
                {
                    case XmlNodeType.Text: //Display the text in each element.
                        //   Console.WriteLine(reader.Value);
                     String s=reader.Value;
              }
}
My doubt is that will the string variable "s" take values of the ip and port..and how do i fit it into the socket statement...please help me with this
AnswerRe: XML [modified] Pin
harold aptroot12-Mar-09 6:03
harold aptroot12-Mar-09 6:03 
GeneralRe: XML Pin
mrithula813-Mar-09 1:16
mrithula813-Mar-09 1:16 
GeneralRe: XML Pin
mrithula813-Mar-09 6:40
mrithula813-Mar-09 6:40 
GeneralRe: XML Pin
harold aptroot13-Mar-09 6:50
harold aptroot13-Mar-09 6:50 
GeneralRe: XML Pin
mrithula813-Mar-09 7:57
mrithula813-Mar-09 7:57 
GeneralRe: XML Pin
harold aptroot13-Mar-09 8:33
harold aptroot13-Mar-09 8:33 
AnswerRe: XML Pin
Michael Bookatz12-Mar-09 6:17
Michael Bookatz12-Mar-09 6:17 
Questionrecieving error in this program Pin
Nettai12-Mar-09 5:45
Nettai12-Mar-09 5:45 
AnswerRe: recieving error in this program Pin
Teuz12-Mar-09 6:01
Teuz12-Mar-09 6:01 
GeneralRe: recieving error in this program Pin
Nettai12-Mar-09 6:14
Nettai12-Mar-09 6:14 
GeneralRe: recieving error in this program Pin
Teuz12-Mar-09 6:18
Teuz12-Mar-09 6:18 
GeneralRe: recieving error in this program Pin
#realJSOP12-Mar-09 6:41
mve#realJSOP12-Mar-09 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.