i want to use http/ socket protocol for communicating between two mobile phones. how do i assign IP addresses to mobile phones.
do i need any other device in addtion to mobile phones? do i need to contact my service provider for the same?
You can't do it. Your operator does it (their network).
Some operators assign only private IP addresses (a phone cannot connect directly to another phone, even if they are on the same operator's network).
Some operators can assign also public IP addresses. For those that do, they still may prevent incoming connections initiated from another device (i.e., the phone user can connect to things, but others still can't connect to that phone).
So, talk to your operator(s).
You can work around that by both phones connecting to and going through a central server.