Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

maher khalil

@maher khalil
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Theading with TCPListner Optimization
    M maher khalil

    sorry for late replay it didn't work still 92% CPU after 20 min with only 4 devices i put stream.close inside the catch i put clientsocket.close inside the catch the error was cannot access a disposed object system.net.sockets.socket should i use Async Asynchronous Server Socket

    C# csharp performance database sql-server linq

  • Theading with TCPListner Optimization
    M maher khalil

    i tried that it got worse it hang after starting by 2 minutes

    C# csharp performance database sql-server linq

  • Theading with TCPListner Optimization
    M maher khalil

    you are right about closing the network stream and the clients could you point out where in the code to do so

    C# csharp performance database sql-server linq

  • Theading with TCPListner Optimization
    M maher khalil

    i'm using

    using (SqlConnection conn = new SqlConnection(ConnStr))
    {
    conn.Open();
    using (SqlCommand comm = new SqlCommand("Select id from T_SafeArea", conn))
    {

                }
                conn.Close();
                conn.Dispose();
            }
    
    C# csharp performance database sql-server linq

  • Theading with TCPListner Optimization
    M maher khalil

    i guess you are right please check that code part

    while (true)
    {
    counter += 1;
    clientSocket = serverSocket.AcceptTcpClient();

                handleClinet client = new handleClinet();
                client.startClient(clientSocket, Convert.ToString(counter));
            }
    
            clientSocket.Close();
            serverSocket.Stop();
    

    it will never go to the close part

    C# csharp performance database sql-server linq

  • Google map Context Menu
    M maher khalil

    Hi all i am creating gps tracking system i have to do two things with the marker 1- create context menu with some functions on the marker 2- add car number as label on the marker the first thing is finished Map With Context Menu when i tried to do the second issue a conflict (i think) happened i included a JS library Map Label Library both are working alone but when combined no thin work code after combine Map With Labels and Context Menu some details both depend on overlay errors TypeError: a.lng is not a function ...b=b||new _.G(0,0);var c=this.b;b.x=c.x+a.lng()*this.j;a=_.Za(Math.sin(_.Sb(a.lat... InvalidValueError: not a LatLng or LatLngLiteral: in property lat: not a number TypeError: c.lat is not a function ...,c=d.b.search(_.vi)):(c=a.ca,c=new _.G(c.lat(),c.lng()),a.da=c,_.uJ(d.j,{da:c,ye... InvalidValueError: not a LatLng or LatLngLiteral: in property lat: not a number Thank You

    JavaScript javascript com help

  • Theading with TCPListner Optimization
    M maher khalil

    Hi All i'm working on gps tracking system now i'm working on receiving data from gps devices throw tcp port using tcpListner class then arrange the data then save it to sql server i have created a console application to do so then convert it to windows service using NSSM it is working as expected but after about 30 minutes it consumes all the server memory and CPU it is only 4 devices connected (Test Phase) The Code

    using System;
    using System.Threading;
    using System.Net.Sockets;
    using System.Text;
    using System.Text.RegularExpressions;
    using System.Diagnostics;
    using System.Data.SqlTypes;
    using System.Data.SqlClient;
    using System.Data;
    using Microsoft.SqlServer.Types;
    using System.Linq;

    namespace ConsoleApplication1
    {
    class Program
    {
    static void Main(string[] args)
    {
    TcpListener serverSocket = new TcpListener(8889);
    TcpClient clientSocket = default(TcpClient);
    int counter = 0;

            serverSocket.Start();
            //  Console.WriteLine(" >> " + "Server Started");
    
            counter = 0;
            while (true)
            {
                counter += 1;
                clientSocket = serverSocket.AcceptTcpClient();
                //  Console.WriteLine(" >> " + "Client No:" + Convert.ToString(counter) + " started!");
                handleClinet client = new handleClinet();
                client.startClient(clientSocket, Convert.ToString(counter));
            }
    
            clientSocket.Close();
            serverSocket.Stop();
            //   Console.WriteLine(" >> " + "exit");
            Console.ReadLine();
        }
    }
    
    //Class to handle each client request separatly
    public class handleClinet
    {
    
        static void WriteLog(string message, EventLogEntryType type)
        {
    
            using (EventLog eventLog = new EventLog("Application"))
            {
                eventLog.Source = "Application";
                eventLog.WriteEntry(message, type, 101, 1);
            }
        }
        static int InsideDangerArea(double Lat, double Lng)
        {
    
            string point = "POINT(" + Lng + "  " + Lat + ")";
    
            string ConnStr = "Data Source =.; Initial Catalog = GPS\_Tracking;Integrated Security = True";
            using (SqlConnection conn = new SqlConnection(ConnStr))
            {
                conn.Open();
                using (SqlCommand comm = new SqlCommand
    
    C# csharp performance database sql-server linq
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups