Click here to Skip to main content
15,917,731 members
Home / Discussions / C#
   

C#

 
QuestionPdf export file does not complete page 2 if the "mode" summary option is selected Pin
Mishalin5-Oct-06 4:09
Mishalin5-Oct-06 4:09 
QuestionCrystal Reports automatically sorts my columns and rows in a cross tab Pin
Mishalin5-Oct-06 3:53
Mishalin5-Oct-06 3:53 
QuestionDrawing bitmap? Pin
Dominik Reichl5-Oct-06 2:36
Dominik Reichl5-Oct-06 2:36 
AnswerRe: Drawing bitmap? Pin
aamironline5-Oct-06 4:53
aamironline5-Oct-06 4:53 
GeneralRe: Drawing bitmap? Pin
Dominik Reichl5-Oct-06 6:43
Dominik Reichl5-Oct-06 6:43 
AnswerRe: Drawing bitmap? Pin
Insincere Dave5-Oct-06 4:58
Insincere Dave5-Oct-06 4:58 
GeneralRe: Drawing bitmap? Pin
Dominik Reichl5-Oct-06 6:43
Dominik Reichl5-Oct-06 6:43 
QuestionClient/server communication Pin
The underdog5-Oct-06 2:09
The underdog5-Oct-06 2:09 
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
     byte[] data = Encoding.ASCII.GetBytes("This is a test");<br />
     sokje.SendTo(data, eindPunt);<br />
}<br />


This is the code i use for sending data to the server. This goes without an error (Though im not shure if its correct so comment is welcome).


<br />
        /*<br />
        IPHostEntry survur = Dns.GetHostEntry("Jacco");<br />
            sokje.Connect(survur.AddressList[0],11000);   <br />
            eindPunt = new IPEndPoint(survur.AddressList[0] , 11000);<br />
<br />
        */<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            sokje.Listen(5);<br />
            sender = new IPEndPoint(Dns.Resolve(IPAddress.Any.ToString()).AddressList[0] , 11000);<br />
            EndPoint senderRemote = (EndPoint)sender;<br />
<br />
            int ontvangen;<br />
<br />
            //sokje.Bind(localEndPoint);  <br />
<br />
            byte[] data = new Byte[256];<br />
            ontvangen = Convert.ToInt16(sokje.Receive(data));        <br />
        }<br />


This is the code i use to recieve messages. This gives me this error :
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll

With the following comment :
Socket is not connected and sender has not given an adress

The purpose of the program :
It doesn't really have a purpose yet. Im just expirimenting with c# a bit. For the future i plan on creating some gaming stuff (poker or so) freeware offcourse.

My question :
Can someone explain to me why this is not working and the way im supposed to make it? i started networking only 1 week a go so i would preffer a (relative) easy explanation.

Kind regards Jacco
AnswerRe: Client/server communication Pin
Andrei Ungureanu5-Oct-06 2:29
Andrei Ungureanu5-Oct-06 2:29 
GeneralRe: Client/server communication Pin
The underdog5-Oct-06 2:40
The underdog5-Oct-06 2:40 
GeneralRe: Client/server communication Pin
Andrei Ungureanu5-Oct-06 3:15
Andrei Ungureanu5-Oct-06 3:15 
GeneralRe: Client/server communication [modified] Pin
The underdog5-Oct-06 3:24
The underdog5-Oct-06 3:24 
Questionupdate dataset fields in runtime Pin
topcatalpha5-Oct-06 1:28
topcatalpha5-Oct-06 1:28 
QuestionNo application associated with specified file... [modified] Pin
Support1235-Oct-06 1:26
Support1235-Oct-06 1:26 
QuestionSaving list box contents Pin
Wolf925-Oct-06 1:07
Wolf925-Oct-06 1:07 
AnswerRe: Saving list box contents Pin
rah_sin5-Oct-06 1:27
professionalrah_sin5-Oct-06 1:27 
AnswerRe: Saving list box contents Pin
MCSD-Gandalf5-Oct-06 1:27
MCSD-Gandalf5-Oct-06 1:27 
QuestionTree Library / control for c# Pin
t4ure4n5-Oct-06 0:52
t4ure4n5-Oct-06 0:52 
QuestionDoubt in Switch-Case statement. Pin
He is Cool5-Oct-06 0:41
He is Cool5-Oct-06 0:41 
AnswerRe: Doubt in Switch-Case statement. Pin
albCode5-Oct-06 0:48
albCode5-Oct-06 0:48 
GeneralRe: Doubt in Switch-Case statement. Pin
He is Cool5-Oct-06 0:53
He is Cool5-Oct-06 0:53 
GeneralRe: Doubt in Switch-Case statement. Pin
Colin Angus Mackay5-Oct-06 0:54
Colin Angus Mackay5-Oct-06 0:54 
GeneralRe: Doubt in Switch-Case statement. Pin
Christian Graus5-Oct-06 1:00
protectorChristian Graus5-Oct-06 1:00 
AnswerRe: Doubt in Switch-Case statement. Pin
Christian Graus5-Oct-06 0:53
protectorChristian Graus5-Oct-06 0:53 
GeneralRe: Doubt in Switch-Case statement. Pin
Colin Angus Mackay5-Oct-06 1:04
Colin Angus Mackay5-Oct-06 1:04 

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.