Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community

Showing results for tags 'socket'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 2 results

  1. hello i wrote a simple connection script using socket this is my server script (Visual stuido Console Projcet) private static Socket _SERVER; private static Socket _CLIENT; private static byte[] _BUFFER; private static NetworkStream _STREAM; private static string _IPADDRESS = "127.0.0.1"; private static int _PORT = 8888; static void Main(string[] args) { try { _SERVER = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); _SERVER.Bind(new IPEndPoint(IPAddress.Parse(_IPADDRESS), _PORT)); _SERVER.Listen(500); Console.WriteLine("[server] Server started succesfully"); } catch { Console.WriteLine("[server] Failed to start server"); } while(true) { Console.ReadLine(); } } and this is my client script (Unity) public Socket _CLIENT; public NetworkStream _STREAM; public string _IPADDRESS; public int _PORT; void Start() { bool clientStarted = StartClient(); if (clientStarted) { Debug.Log("[Client] Client ready"); } else { Debug.Log("[Client] Failed to start client"); } Connect(); } public bool StartClient() { try { _CLIENT = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); } catch { return false; } return true; } public void Connect() { try { _CLIENT.Connect(IPAddress.Parse(_IPADDRESS), _PORT); _STREAM = new NetworkStream(_CLIENT); Debug.Log("[Client] Connected to server"); } catch { Debug.Log("[Client] Failed to connect to server"); } } all seem to work perefectly fine. what should i do next? i want to spawn player and sync his position over the network thanks
  2. hello i made a simple netowkr code using socket now i want to spawn the player how can i use Network.instantiate with socket? is there a difrent way of doing it? thanks
×
×
  • Create New...