TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jaanus
NA
1
0
Could not load 'Microsoft.Practices.EnterpriseLibrary.Common
Mar 12 2010 3:38 PM
ques. -Sockets A2S_PLAYERS response problem, can't get all data readed.
Hello,
I have a problem with GameServer Query A2S_PLAYER query,
If there are like 6 people in server, then the code only ready 3, but if i look the data what is recived, then i can see all 6, can anybody help me with that?
I have searched and played with the code many days already but can't get it work correctly.
Query information: http://developer.valvesoftware.com/wiki/Server_queries Look at A2S_PLAYER Section.
Thank you.
SourceQuery ret =
new
SourceQuery();
int
i =0;
var
Players =
new
ListView();
ret.Response = Encoding.Default.GetString(resp);
//if (Type == 0x6D)
//{
ret.Magic = BitConverter.ToInt32(resp, 0);
i += sizeof(Int32);
ret.Type = resp[i++];
ret.NumPlayers = resp[i++];
int
NumPlayers = ret.NumPlayers;
int
pNR = 0;
i = 6;
while
(pNR < NumPlayers && i < resp.Length)
{
var
PlayerItem =
new
ListViewItem();
PlayerItem.Name =
"Player"
;
PlayerItem.Text = GetString(resp, ++i, resp.Length);
i += PlayerItem.Text.Length + 1;
var
Score =
new
System.Windows.Forms.ListViewItem.ListViewSubItem();
Score.Name =
"Score"
;
Score.Text = BitConverter.ToInt32(resp, i).ToString();
i += 4;
PlayerItem.SubItems.Add(Score);
var
PlayTime =
new
System.Windows.Forms.ListViewItem.ListViewSubItem();
PlayTime.Name =
"Time"
;
PlayTime.Text =
new
TimeSpan(0, 0, (
int
)BitConverter.ToSingle(resp, i)).ToString();
i += 4;
PlayerItem.SubItems.Add(PlayTime);
pNR++;
Players.Items.Add(PlayerItem);
}
Reply
Answers (
0
)
How do I: Get dataGrid values by the colum name?
Getting image from database