single object of socket io : I am trying to create an application based on socket. Looking at the console it can be said that the client to trying to socket server twice. which should not be allowed. 
1. Is there any way to stop that ?
2. If have modular javascript file where multiple script want to access same socket connection how is that possible ?

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <!DOCTYPE html>
    <html>
    <head>
    	<title>socket</title>
    	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    	<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
    </head>
    <body>

    <script type="text/javascript">
    	$(function(){
    		var socket = io();
    		console.log(typeof socket); // object
    		var socket1 = io();
    		console.log(socket === socket1); // false
    	})
    </script>
    </body>
    </html>

<!-- end snippet -->

