locked
Trouble with p2p connection RRS feed

  • Question

  • Recently I am programming a p2p application with c# socket.

    I am forwarding ports with mono.Nat package.

    I have some problems with connecting.

    Sockets can't connect however I forwarded ports.

    I am using my router IP as host IP.

    public static Socket PublicStream = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    Program.availsock.Send(Networkbyted); //how i send
    
    len = TargetSocket.Receive(BytedNetworkString);
    TargetSocket.Connect(Host Ipendpoint);

    Here is how I defined my sockets and I am sending by socket.

    I am very newbie about sockets. How can I fix this. Please provide me simple explanation.

    Thanks.

    Friday, September 4, 2020 10:28 AM

Answers

All replies

  • Hi Compo_Team,

    Thank you for posting here.

    I have moved the thread to 'Where is the forum for...?' forum to help you find the correct forum to go ask questions.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 7, 2020 3:04 AM
  • I'd try asking for help over here.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpgeneral

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Dave PatrickMVP Tuesday, September 8, 2020 1:12 PM
    • Marked as answer by Guido Franzke Monday, September 14, 2020 6:36 AM
    Monday, September 7, 2020 12:41 PM
  • Ensure that all connections are closed by right clicking the task bar icon and selecting Close all remote connections. If this option is not available, then no remote connections are currently active. Locate the device you wish to connect to in the Site list.
    Monday, September 7, 2020 2:34 PM