Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 4:52
SledgeHammer0118-Aug-14 4:52 
GeneralRe: C# Performance Issue Pin
Pete O'Hanlon18-Aug-14 4:56
mvePete O'Hanlon18-Aug-14 4:56 
AnswerRe: C# Performance Issue Pin
jschell18-Aug-14 11:51
jschell18-Aug-14 11:51 
QuestionC#/JS problematic iteration with table... Pin
OmegaExtern16-Aug-14 17:23
OmegaExtern16-Aug-14 17:23 
AnswerRe: C#/JS problematic iteration with table... Pin
Richard MacCutchan16-Aug-14 21:11
mveRichard MacCutchan16-Aug-14 21:11 
QuestionC# Keybind for Autoclicker Pin
Aaudiio16-Aug-14 16:39
Aaudiio16-Aug-14 16:39 
AnswerRe: C# Keybind for Autoclicker Pin
Zain Ul Abidin16-Aug-14 19:49
Zain Ul Abidin16-Aug-14 19:49 
AnswerRe: C# Keybind for Autoclicker Pin
OmegaExtern16-Aug-14 20:44
OmegaExtern16-Aug-14 20:44 
GeneralRe: C# Keybind for Autoclicker Pin
Aaudiio16-Aug-14 20:47
Aaudiio16-Aug-14 20:47 
GeneralRe: C# Keybind for Autoclicker Pin
OmegaExtern16-Aug-14 20:50
OmegaExtern16-Aug-14 20:50 
Questioncheck array value exists Pin
scottichrosaviakosmos16-Aug-14 3:11
scottichrosaviakosmos16-Aug-14 3:11 
AnswerRe: check array value exists Pin
onelopez16-Aug-14 3:34
onelopez16-Aug-14 3:34 
GeneralRe: check array value exists Pin
scottichrosaviakosmos16-Aug-14 4:03
scottichrosaviakosmos16-Aug-14 4:03 
AnswerRe: check array value exists Pin
OriginalGriff16-Aug-14 3:39
mveOriginalGriff16-Aug-14 3:39 
QuestionCatching exceptions on backgroundworker Pin
pjank4215-Aug-14 19:44
pjank4215-Aug-14 19:44 
QuestionRe: Catching exceptions on backgroundworker Pin
Richard MacCutchan15-Aug-14 21:25
mveRichard MacCutchan15-Aug-14 21:25 
AnswerRe: Catching exceptions on backgroundworker Pin
pjank4216-Aug-14 1:50
pjank4216-Aug-14 1:50 
GeneralRe: Catching exceptions on backgroundworker Pin
Richard MacCutchan16-Aug-14 5:10
mveRichard MacCutchan16-Aug-14 5:10 
AnswerRe: Catching exceptions on backgroundworker Pin
Eddy Vluggen16-Aug-14 2:10
professionalEddy Vluggen16-Aug-14 2:10 
AnswerRe: Catching exceptions on backgroundworker Pin
jschell17-Aug-14 9:56
jschell17-Aug-14 9:56 
GeneralRe: Catching exceptions on backgroundworker Pin
pjank4218-Aug-14 8:40
pjank4218-Aug-14 8:40 
QuestionMissing TCP Packets Pin
M Riaz Bashir15-Aug-14 19:24
M Riaz Bashir15-Aug-14 19:24 
Hi,
Kindly note that, while capturing network incoming tcp packets using following codes/methods, missing some packets. It is sure that all packets all coming on my network perfectly fine but unfortunately I am missing some packets. Please let me know, what and where, I am doing mistake in my following mentioned codes.

Thank you & Regards
(Riaz)


C#
public void Capture()
{
    _mainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
    _mainSocket.Bind(new IPEndPoint(IPAddress.Parse("192.168.1.10"), 0));

    var byTrue = new byte[] { 1, 0, 0, 0 };
    var byOut = new byte[] { 1, 0, 0, 0 };

    _mainSocket.IOControl(IOControlCode.ReceiveAll, byTrue, byOut);

    _mainSocket.EnableBroadcast = true;
    _mainSocket.BeginReceive(_data, 0, _data.Length, SocketFlags.None, OnReceive, null);
}

private void Parse(byte[] data, int size)
{
    ipH = new IPHeader(data, size);
    if (ipH.ProtocolType == Protocol.TCP)
    {
        FilterData(data, size);
    }
    System.Threading.Thread.Sleep(5);
}

private void FilterData(byte[] data, int size)
{
      // Here i am inserting & updating packets data into my database
}

AnswerRe: Missing TCP Packets Pin
Dave Kreskowiak16-Aug-14 4:29
mveDave Kreskowiak16-Aug-14 4:29 
GeneralRe: Missing TCP Packets Pin
M Riaz Bashir16-Aug-14 19:54
M Riaz Bashir16-Aug-14 19:54 
AnswerRe: Missing TCP Packets Pin
Rob Philpott16-Aug-14 6:34
Rob Philpott16-Aug-14 6:34 

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.