A 23-year-old man charged in the homicides of four people inside a Markham, Ont., home appears to have sent online messages to friends about the killings shortly after they occurred, according to two people who received them.

"I've just slaughtered my entire family, and will most likely spend life in jail if i manage to survive," a user going by the name Menhaz posted to Discord, software used by hundreds of millions of gamers around the world to communicate online.

"i wanted them to die so that they didn't suffer knowing how much of a pathetic subhuman i was. its all very selfish."

The messages appear to have been sent around midnight on Sunday, more than 12 hours before police were called to the Markham home and found four bodies.

York Regional Police arrested Menhaz Zaman at the scene and on Monday charged him with four counts of first-degree murder. At a morning news conference, Const. Andy Pattenden said the victims were three women and one man.

i deserve punishment. — Discord user known as Menhaz

CBC News has seen images of the Discord messages that were sent to at least two people who often played the online game Perfect World Void with the user known as Menhaz.

Those two people told CBC News that, because they've known him online for years, they know the user known as Menhaz is Menhaz Zaman.

CBC News has agreed to protect the identities of those two individuals and has not independently confirmed that the user Menhaz is the same person charged in the deaths.

The messages were accompanied by several extremely graphic photographs of dead bodies and bloody weapons. CBC News has seen the photos but has not been able to confirm they are from the Markham crime scene.

Ammara Riaz, a neighbour of the family who previously lived in their home — as a tenant, for nearly five years — confirmed that a profile picture attached to the account of user Menhaz was that of Zaman.

The profile picture attached to the Discord account of the user known as Menhaz. (Submitted)

The user Menhaz wrote that he had lied to his parents for three years about attending university when he actually left school after just one year. Instead of attending classes, he wrote, he would go to a local mall each day and sometimes work out at a nearby gym.

He wrote that he became depressed during his year at university, "became an atheist, and ultimately created this plan."

"I did this bc [because] I dont want my parents to feel the shame of having a son like me," the user Menhaz wrote in the messages.

"I choose to kill them instead out of my own cowardess," he continued. "I know it might sound confusing but whats done is done and what had been planned has been concluded."

He then says he will be turning himself in.

"i deserve punishment."

Police have not commented on the messages or the photographs, and Pattenden declined to reveal the causes of death and whether police recovered any weapons from the scenes.

Zaman appeared in court on Monday, with his next appearance scheduled for Aug. 2.