Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with MdiParent-MdiChildren forms Pin
dan!sh 31-May-09 21:23
professional dan!sh 31-May-09 21:23 
GeneralRe: Problem with MdiParent-MdiChildren forms Pin
Nine_31-May-09 21:29
Nine_31-May-09 21:29 
QuestionHow to delete the URL from cache entry in c#? Pin
svt gdwl31-May-09 20:31
svt gdwl31-May-09 20:31 
QuestionDataGridView Pin
Yathish hatter31-May-09 20:19
Yathish hatter31-May-09 20:19 
AnswerRe: DataGridView Pin
Satish Pai31-May-09 20:29
Satish Pai31-May-09 20:29 
GeneralRe: DataGridView Pin
Yathish hatter1-Jun-09 18:43
Yathish hatter1-Jun-09 18:43 
Questionfacing problem with C# ODP.Net API(Oracle.DataAccess.dll) "Open cursors exceeded" exception is occured Pin
member12345631-May-09 19:33
member12345631-May-09 19:33 
QuestionTCP Server Question *IMPORTANT* Pin
Serpendiem31-May-09 18:30
Serpendiem31-May-09 18:30 
Hello. I was wondering, Im working on a TCP Server. How would I do the follow?

1.) When a client types something in the console, and its sent to the server, how would I parse that and do like an if(data == "hello") { blah blah }. How would I be able to parse the recieved string. If someone could help me I would GREATLY appreciate it. Here is my current server:

using System;
using System.Net;
using System.Net.Sockets;
using System.Text;

public class UdpSrvrSample
{
    public static void Main()
    {
        byte[] data = new byte[1024];
        IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 7557);
        UdpClient newsock = new UdpClient(ipep);

        Console.WriteLine("Waiting for a client...");

        IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);

        data = newsock.Receive(ref sender);

        Console.WriteLine("Connection received from {0}", sender.ToString());

        string welcome = "OpticVPS Remote Administration";
        data = Encoding.ASCII.GetBytes(welcome);
        newsock.Send(data, data.Length, sender);

        while (true)
        {
            data = newsock.Receive(ref sender);

            Console.WriteLine(Encoding.ASCII.GetString(data, 0, data.Length));
   

            
            newsock.Send(data, data.Length, sender);

        }
    }
}


[X] 100% HTML
[ ] 100% PHP
[ ] 100% C#

AnswerRe: TCP Server Question *IMPORTANT* Pin
Jimmanuel1-Jun-09 2:45
Jimmanuel1-Jun-09 2:45 
Question[SOLVED] Future or past date time Pin
CodingLover31-May-09 18:02
CodingLover31-May-09 18:02 
AnswerRe: Future or past date time Pin
CodingLover31-May-09 18:05
CodingLover31-May-09 18:05 
QuestionBelow idea how to be realized in C#? Pin
mctramp16831-May-09 17:08
mctramp16831-May-09 17:08 
AnswerRe: Below idea how to be realized in C#? Pin
Christian Graus31-May-09 19:25
protectorChristian Graus31-May-09 19:25 
GeneralRe: Below idea how to be realized in C#? Pin
mctramp16831-May-09 20:13
mctramp16831-May-09 20:13 
GeneralRe: Below idea how to be realized in C#? Pin
Christian Graus31-May-09 21:48
protectorChristian Graus31-May-09 21:48 
GeneralRe: Below idea how to be realized in C#? Pin
mctramp16831-May-09 22:04
mctramp16831-May-09 22:04 
GeneralRe: Below idea how to be realized in C#? Pin
Pete O'Hanlon31-May-09 22:19
mvePete O'Hanlon31-May-09 22:19 
GeneralRe: Below idea how to be realized in C#? Pin
0x3c01-Jun-09 0:07
0x3c01-Jun-09 0:07 
GeneralRe: Below idea how to be realized in C#? Pin
mctramp1681-Jun-09 1:16
mctramp1681-Jun-09 1:16 
Questioncustom control textbox with a label tied Pin
Wendell.S31-May-09 16:21
Wendell.S31-May-09 16:21 
AnswerRe: custom control textbox with a label tied Pin
Dave Kreskowiak31-May-09 17:28
mveDave Kreskowiak31-May-09 17:28 
QuestionUltra-light native embedded database Pin
Pascal Ganaye31-May-09 10:27
Pascal Ganaye31-May-09 10:27 
AnswerRe: Ultra-light native embedded database Pin
Henry Minute31-May-09 11:07
Henry Minute31-May-09 11:07 
AnswerRe: Ultra-light native embedded database Pin
Garth J Lancaster31-May-09 12:02
professionalGarth J Lancaster31-May-09 12:02 
AnswerRe: Ultra-light native embedded database Pin
Joe Woodbury31-May-09 16:14
professionalJoe Woodbury31-May-09 16:14 

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.